Ensure concurrent prompts are handled.#348
Merged
benbrandt merged 1 commit intozed-industries:mainfrom Feb 27, 2026
Merged
Conversation
SteffenDE
commented
Feb 25, 2026
| claudeCode: { | ||
| promptQueueing: true, | ||
| }, | ||
| }, |
Contributor
Author
There was a problem hiding this comment.
For now I decided to announce this behavior if a client wants to check.
Contributor
|
To give a bit more context, this can probably be considered a bug fix: the code was already forwarding, but the code was not prepared to handle that. So what would happen is that you send the second prompt request, Claude would handle it, but ACP would never reply with the response for the second request. |
benbrandt
approved these changes
Feb 26, 2026
Member
|
@SteffenDE ok i tried doing the conflicts but it got a bit messy... Since you did both this and the usage, maybe you can best resolve it |
This basically implements the pending prompt queueing RFD. When a prompt request is received while the agent is already generating, we immediately forward the message to Claude and then wait until it replays the message back to us. When it replays it, we respond to the previous prompt request with "end_turn", which also singifies to the client that the message is now being processed by the agent. See agentclientprotocol/agent-client-protocol#484.
e49e0f1 to
886fdf5
Compare
Contributor
Author
|
Yeah, the conflict was ugly, but only because git doesn't seem to handle wrapping a block in |
rohan-patra
added a commit
to rohan-patra/claude-agent-acp
that referenced
this pull request
Feb 27, 2026
Brings in upstream changes: - claude-agent-sdk 0.2.62 - Prompt queueing support (zed-industries#348) - History support fix (zed-industries#356) - Windows arm builds (zed-industries#355) - Node --cli support (zed-industries#358) Fork additions preserved: - In-process MCP server (mcp-server.ts) for Zed Review Changes UI - Tool redirect system prompt, PreToolUse hook, PostToolUse onFileRead - acpToolNames cases in tools.ts switch statements - @modelcontextprotocol/sdk and diff dependencies Also improves Write tool: new files that don't exist yet skip the read-before-write guard instead of relying on error message parsing.
SteffenDE
added a commit
to SteffenDE/claude-code-acp
that referenced
this pull request
Mar 6, 2026
Closes zed-industries#381. Relates to zed-industries#348. In zed-industries#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.
Merged
SteffenDE
added a commit
to SteffenDE/claude-code-acp
that referenced
this pull request
Mar 6, 2026
Closes zed-industries#381. Relates to zed-industries#348. In zed-industries#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.
benbrandt
pushed a commit
that referenced
this pull request
Mar 6, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This basically implements the pending prompt queueing RFD. When a prompt request is received while the agent is already generating, we immediately forward the message to Claude and then wait until it replays the message back to us. When it replays it, we respond to the previous prompt request with "end_turn", which also singifies to the client that the message is now being processed by the agent.
See agentclientprotocol/agent-client-protocol#484.