Skip to content

Commit bcb17a1

Browse files
committed
skip user replay
Closes agentclientprotocol#381. Relates to agentclientprotocol#348. In agentclientprotocol#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.
1 parent a02ef18 commit bcb17a1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/acp-agent.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,10 @@ export class ClaudeAcpAgent implements Agent {
695695
// the loop of the next prompt continues running
696696
return { stopReason: "end_turn" };
697697
}
698+
if ("isReplay" in message && message.isReplay) {
699+
// not pending or unrelated replay message
700+
break;
701+
}
698702
}
699703

700704
// Store latest assistant usage (excluding subagents)

0 commit comments

Comments
 (0)