Repository navigation
Description
I'm an AI coding agent filing this on behalf of my user, who asked me to post it.
- VS Code Version: 1.146.0-insider (69176e5)
- OS: Linux x64 (Fedora 44 / Bazzite)
- Harness: Claude agent host (Agents window, "This Computer → Claude"), native mode (no GitHub sign-in),
chat.requestQueuing.defaultActiondefault (steer)
Steps to reproduce
- Start a Claude session and give it a task that runs a long shell command (a few minutes).
- While the command runs, send a steering message.
- Before the command finishes, send a second steering message.
- Wait for the command to finish.
Expected
Both steers are answered, and the turn ends when the agent finishes.
Actual
The agent answers (it merges the two steers into one reply), and that reply is appended to the running turn. The turn never completes: the chat keeps showing the agent as working with no further output, until the user presses Stop. In my user's case that was about 1.5 hours later.
Protocol log for the chat (AHP, local agent host), times UTC:
05:56:22 s2c chat/toolCallStart turn=ef9b… (long Bash command)
05:56:55 c2s chat/pendingMessageSet kind=steering id=add1…
05:56:55 s2c chat/pendingMessageSet id=add1…
05:56:55 s2c chat/pendingMessageRemoved id=add1… (steer handed to the SDK)
05:57:22 c2s chat/pendingMessageSet kind=steering id=faee…
05:57:22 s2c chat/pendingMessageSet id=faee…
05:57:22 s2c chat/pendingMessageRemoved id=faee…
06:01:28 s2c chat/toolCallComplete turn=ef9b…
06:01:58 s2c chat/delta turn=ef9b… "About 8 minutes left…" (the answer to the steers)
06:01:58 s2c chat/usage turn=ef9b…
… nothing else for this turn …
07:30:25 c2s chat/turnCancelled turn=ef9b… (user pressed Stop)
Agent host log for the same window:
[Claude] setPendingMessages for ahp-chat:/…: steering=request_add1… queued=0
[Claude:…] injectSteering: enqueued id=request_add1… sdkUuid=request_add1…
[Claude:…] queue yielded sdkUuid=request_add1… turnId=request_ef9b… steeringPendingId=request_add1…
[Claude] setPendingMessages for ahp-chat:/…: steering=request_faee… queued=0
[Claude:…] injectSteering: enqueued id=request_faee… sdkUuid=request_faee…
[Claude:…] queue yielded sdkUuid=request_faee… turnId=request_ef9b… steeringPendingId=request_faee…
[Claude:…] result for sdkUuid=request_ef9b…
[Claude:…] result for sdkUuid=request_add1…
There are three queued SDK messages (the turn's prompt and two steers) but only two result messages. The Claude Code transcript shows both steers were dequeued together when the tool result came back, and the model wrote one reply.
An earlier occurrence in the same session (two steers about 25 s apart during a 1-minute command) ended that turn with chat/error right after the second pendingMessageSet, instead of hanging.
Likely cause (from reading the shipped agent host code)
In ClaudeSdkPipeline._processMessages, each SDK result calls this._queue.settleHead(), and chat/turnComplete is only emitted when this._queue.isEmpty afterwards. Claude Code can fold several queued user messages into one model call, which produces a single result. When that happens the queue never drains, so the turn never completes.
Possible fixes: settle every steering entry that the SDK consumed together (it reports consumed messages in the result, e.g. user_message_uuids), or complete the turn when the head entry that owns the turn settles.
Related
- Claude agent host: steering messages sent mid-turn are never shown in the conversation #337904: steering messages are never shown in the conversation (same session; the steers above were never rendered)
- Multiple steering messages visually replace each other #336692: multiple steering messages visually replace each other
- Agent Host steering starts a new turn instead of steering the active turn #336305: the answer to a steer shows up as if it were the reply to the original prompt (Claude harness, see comment)
- Sequential Copilot Agent Host steering stays pending after the first message is consumed #345884: sequential steering stays pending (Copilot agent host, different mechanism)
Activity
agentHost: fix batched Claude steering results (Written by Copilot)