From ee820b185ccb940beea6226450da08a00853eaf8 Mon Sep 17 00:00:00 2001 From: krissding Date: Wed, 29 Jul 2026 18:40:34 +0800 Subject: [PATCH] fix(acp): attach error listener to spawned ACP agent process (#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 Co-authored-by: Peter Steinberger --- src/acp/client.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/acp/client.ts b/src/acp/client.ts index d5950993e934..d8e4f731c94b 100644 --- a/src/acp/client.ts +++ b/src/acp/client.ts @@ -147,6 +147,10 @@ async function createAcpClient(opts: AcpClientOptions = {}): Promise { + log(`agent error: ${String(err)}`); + }); + const input = Writable.toWeb(agent.stdin); const output = Readable.toWeb(agent.stdout) as unknown as ReadableStream; const stream = ndJsonStream(input, output);