Repository navigation
fix(acp): attach error listener to spawned ACP agent process - #109529
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 8:05 AM ET / 12:05 UTC. Summary PR surface: Source +4. Total +4 across 1 file. Reproducibility: yes. from source and the Node child-process contract: run the ACP client with a nonexistent agent command to trigger ENOENT, although that path was not executed during this read-only review. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the focused listener, then prove a nonexistent or non-executable Do we have a high-confidence way to reproduce the issue? Yes, from source and the Node child-process contract: run the ACP client with a nonexistent agent command to trigger ENOENT, although that path was not executed during this read-only review. Is this the best way to solve the issue? Yes, attaching a listener at the owned ChildProcess boundary is the narrow standard fix; merge confidence still requires proof that the downstream initialization path terminates promptly. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6745f9a55328. Label changesLabel justifications:
Evidence reviewedPR surface: Source +4. Total +4 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (9 earlier review cycles; latest 8 shown)
|
5108da7 to
b9b8dfd
Compare
7528da8 to
cafdc42
Compare
The spawned agent child process in createAcpClient had no error listener. If the agent binary failed to start, the error event would be unhandled and could crash the process. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
cafdc42 to
f5b1be3
Compare
|
Merged via squash.
|
* origin/main: (224 commits) fix(memory): preserve Windows session ownership (openclaw#115851) fix(compaction): drop context-engine fallback on codex ownership skip (openclaw#114155) (openclaw#115666) fix(msteams): ignore blank certificate settings (openclaw#109112) fix(usage): guard malformed DeepSeek payloads (openclaw#110785) docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) ... # Conflicts: # src/agents/apply-patch.ts # src/agents/sandbox/fs-bridge-mutation-helper.ts
* origin/main: docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) fix(setup): make Gemini recovery actionable (openclaw#115835) fix(terminal-core): prevent String.replace $ pattern injection in display-string (openclaw#111398) refactor(channels): share ingress retention defaults (openclaw#115824) fix(nostr): profile imports vary on timestamp ties (openclaw#111798)
…w#109529) The spawned agent child process in createAcpClient had no error listener. If the agent binary failed to start, the error event would be unhandled and could crash the process. Co-authored-by: Claude Sonnet 4.6 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) fix(setup): make Gemini recovery actionable (openclaw#115835) fix(terminal-core): prevent String.replace $ pattern injection in display-string (openclaw#111398) refactor(channels): share ingress retention defaults (openclaw#115824) fix(nostr): profile imports vary on timestamp ties (openclaw#111798)
What Problem This Solves
createAcpClient()spawns an agent child process but never attaches an error listener. If the agent binary is missing or fails to start, the unhandled'error'event on the ChildProcess can crash the process.Why This Change Was Made
The spawned agent already has an
agent.on("exit", ...)handler inrunAcpClientInteractive, but no corresponding error listener. An error listener prevents unhandled-error crashes when the agent process fails to start (ENOENT, permission denied, etc.).Evidence
All 57 ACP client tests pass, no regressions:
Merge Risk
Low — single-file, +4 lines. The error listener logs via the existing
logfunction (verbose-only) and lets the existingclient.initialize()failure path handle the dead agent naturally.Maintainer-verified real subprocess proof (2026-07-29)
Verified on Blacksmith Testbox
tbx_01kypmr7vw2mtjbnjjsqkbh07cagainst both immutable revisions: original contributor commitf5b1be371d40c439b527c9f397d9ef3e4619bd83with the actually installed ACP SDK1.1.0, and the current-main integration commit41b9d27042c5d85c6b093d5d13f58632a83b05d8with the actually installed ACP SDK1.3.0. Both runs independently verified the exact unchanged contributor source blobd8e4f731c94b033ab075c41a2a834c5aa61f541b.Real
node --import tsx src/entry.ts acp client --server <command> --verbosesubprocess output, observed on both SDK versions:Each invocation was bounded by
timeout --kill-after=2s 25s; both exact revision runs asserted the CLI returns1promptly, the SDK rejects withACP connection closed, and output contains no unhandlederrorevent,node:events:fatal stack, or uncaught exception. Realacp client --helpalso exited successfully on both revisions.Current-main integration regression proof:
The CLI process shard additionally exercises real Gateway-backed ACP initialization, buffered initialize delivery, bridge disconnect, and prompt help/process termination. The original SDK 1.1.0 checkout independently passed its two existing ACP/client CLI regression files (67 tests). Both remote commands returned successful provider timing records with
exitCode=0.