From 21522bb84c76947f86c410fb9776edf735ac79ba Mon Sep 17 00:00:00 2001 From: Steffen Deusch Date: Fri, 6 Mar 2026 14:06:39 +0100 Subject: [PATCH] skip user replay Closes #381. Relates to #348. In #348 I added replay to handle queued prompts. In Tidewave, we ignore user_message_chunks, so I did not experience the issue when testing. But clients that show the user_message_chunk like Zed showed the replayed content. This commit ensures that replayed messages are skipped. --- src/acp-agent.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/acp-agent.ts b/src/acp-agent.ts index e6550428..d99ee5a3 100644 --- a/src/acp-agent.ts +++ b/src/acp-agent.ts @@ -695,6 +695,10 @@ export class ClaudeAcpAgent implements Agent { // the loop of the next prompt continues running return { stopReason: "end_turn" }; } + if ("isReplay" in message && message.isReplay) { + // not pending or unrelated replay message + break; + } } // Store latest assistant usage (excluding subagents)