Skip to content

Claude agent host: two steering messages during one tool call leave the turn running forever #346483

Closed

Description

@axydavid

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.defaultAction default (steer)

Steps to reproduce

  1. Start a Claude session and give it a task that runs a long shell command (a few minutes).
  2. While the command runs, send a steering message.
  3. Before the command finishes, send a second steering message.
  4. 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

Activity

  1. added
    bug
    claude-agent
    on Nov 11, 2026
  2. added a commit that references this issue on Nov 11, 2026
    202588f
  3. added this to the 1.147.0 milestone on Nov 11, 2026
  4. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugclaude-agentinsiders-releasedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions