Skip to content

docs(rfd): prompt queueing RFD#484

Draft
SteffenDE wants to merge 1 commit intoagentclientprotocol:mainfrom
tidewave-ai:sd-prompt-queueing
Draft

docs(rfd): prompt queueing RFD#484
SteffenDE wants to merge 1 commit intoagentclientprotocol:mainfrom
tidewave-ai:sd-prompt-queueing

Conversation

@SteffenDE
Copy link
Contributor

A frequently requested feature for Tidewave is the ability to queue prompts like in Claude Code CLI. This is my idea of how that could work.

Now the problem with this is that I tried to find a way to actually get the Claude Agent SDK to tell me when the queued message is inserted into the context, but it looks like there is no way. The message is immediately pulled from the AsyncInterable and the generator does not include any hint when to inject it into a chat view...

I guess one way to cheat would be to just insert it whenever all pending tool results are done. Maybe that's what Claude Code does.

@benbrandt benbrandt moved this to Draft Proposal in Roadmap Feb 19, 2026
@SteffenDE
Copy link
Contributor Author

Ok, so for Claude we actually can find out when the SDK processed the message by passing extraArgs: {"replay-user-messages": ""}. Then, the SDK replays the user message (https://platform.claude.com/docs/en/agent-sdk/typescript#sdkuser-message-replay), so we can compare the message to what was sent to know when it was sent.

SteffenDE added a commit to SteffenDE/claude-code-acp that referenced this pull request Feb 25, 2026
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.
SteffenDE added a commit to SteffenDE/claude-code-acp that referenced this pull request Feb 25, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Draft Proposal

Development

Successfully merging this pull request may close these issues.

1 participant