Files
oh-my-pi/packages/coding-agent/src
metaphorics 6c94081888 fix(eval): surface unexpected JS eval worker exit via close listener
In `wrapBunWorker` (`packages/coding-agent/src/eval/js/context-manager.ts`), `error` and `messageerror` listeners were registered during normal operation, but the `close` listener was only added inside `close()`. If user code called `process.exit(0)` or the Bun worker otherwise exited cleanly, the `close` event fired with no handler, so `runOnce` never rejected and callers hung until the cell timeout.

Add a normal-operation `close` listener in `wrapBunWorker.onError` that forwards `new Error("JS eval worker exited")` through the existing error handler path, and remove it in the returned unsubscribe callback.

Verified with `bun run check:types` and `bun test test/tools/eval-*.test.ts test/core/eval-workflow-helpers.integration.test.ts` (32 pass, 0 fail).

Closes #4244
2026-07-02 17:29:42 +09:00
..
…
2026-07-02 03:29:30 +02:00
…
2026-07-01 00:07:30 +00:00
…
…