nexus/packages/adapters/codex-local
Mikhail Batukhtin 01fb97e8da fix(codex-local): handle spawn error event in CodexRpcClient
When the `codex` binary is absent from PATH, Node.js emits an `error`
event on the ChildProcess. Because `CodexRpcClient` only subscribed to
`exit` and `data` events, the `error` event was unhandled — causing
Node to throw it as an uncaught exception and crash the server.

Add an `error` handler in the constructor that rejects all pending RPC
requests and clears the queue. This makes a missing `codex` binary a
recoverable condition: `fetchCodexRpcQuota()` rejects, `getQuotaWindows()`
catches the error and returns `{ ok: false }`, and the server stays up.

The fix mirrors the existing pattern in `runChildProcess`
(packages/adapter-utils/src/server-utils.ts) which already handles
`ENOENT` the same way for the main task execution path.
2026-03-29 14:20:55 +03:00
..
src fix(codex-local): handle spawn error event in CodexRpcClient 2026-03-29 14:20:55 +03:00
CHANGELOG.md chore: release v0.3.1 2026-03-12 13:09:22 -05:00
package.json fix: add npm provenance package metadata 2026-03-17 16:01:48 -05:00
tsconfig.json Fix root TypeScript solution config 2026-03-09 14:09:30 -05:00