nexus/packages/adapters
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
..
claude-local Remove noisy "Loaded agent instructions file" log from all adapters 2026-03-24 11:48:43 -05:00
codex-local fix(codex-local): handle spawn error event in CodexRpcClient 2026-03-29 14:20:55 +03:00
cursor-local refactor: use async fs.readFile in readCursorAuthInfo for consistency 2026-03-25 21:52:38 -07:00
gemini-local Remove noisy "Loaded agent instructions file" log from all adapters 2026-03-24 11:48:43 -05:00
openclaw-gateway Merge pull request #743 from Sigmabrogz/fix/openclaw-gateway-unhandled-rejection 2026-03-19 09:12:20 -05:00
opencode-local Fix headless OpenCode permission prompts 2026-03-26 11:12:35 -05:00
pi-local Fix Pi adapter execution and improve transcript parsing 2026-03-26 10:59:58 +01:00