Skip to content

Agent host: Claude session spins forever after rebind, though turn completed #348078

Closed as duplicate

Description

Summary

In the Agents window, a Claude session sometimes keeps the "in progress"
animation forever. The Claude turn actually finishes: the transcript has
an end_turn. But the agent host never sends any progress or completion
to the UI. It happens only on turns where the host first logs
rebinding before turn … for changed client customizations (or
… for changed client tools). "Developer: Reload Window" doesn't clear
it. Restarting VS Code does, because the session is then restored from
the transcript and shows as finished.

Environment

  • VS Code 1.146.0 (6904719), Linux x64,
    kernel 6.8.0
  • GitHub Copilot Chat 0.74.0 (built-in)
  • Claude Code extension 2.1.322, provider: claude (firstParty, OAuth token)
  • Several VS Code windows open at once, all attached to the same agent
    host. Each has a different client tool set; some have browser tools
    and some don't.

Steps to reproduce (intermittent)

  1. Open a Claude session in the Agents window and finish a turn.
  2. Change what the client exposes before sending the next message, for
    example by focusing or opening another window that attaches as the
    active client with a different tool list, or by editing a skill or
    customization.
  3. Send a follow-up message.

Expected: the turn streams and completes in the UI.
Actual: sometimes no progress ever shows up and the spinner never
stops, even though Claude finishes the turn in the background.

Log evidence (agenthost.log, times are local UTC+8)

A stuck turn:

15:14:50.963 [info] [Claude] session 15663b9a…: rebinding before turn request_0a636148… for changed client customizations
15:14:50.971 [info] [Claude] session 15663b9a…: rebuild isResume=true agent=(none)
15:14:51.071 [error] [ClaudeSdkPipeline:15663b9a…] _processMessages crashed: Error: Claude SDK stream ended without a result message
15:14:51.463 [info] [Claude] session 15663b9a…: rebuild isResume=true agent=(none)
15:14:51.552 [info] [Claude:15663b9a…] queue yielded sdkUuid=request_0a636148… turnId=request_0a636148…
   (no AgentHostFirstProgress for request_0a636148… ever follows)
15:17:32.746 [error] [AgentSideEffects] sendMessage failed for session=ahp-chat:/42e32855…: Canceled   (on quitting VS Code)

The Claude transcript for the same SDK session shows the turn ran to
the end:

07:14:53Z user       "…follow-up question…"
07:15:03Z assistant  tool_use Bash
07:15:12Z assistant  tool_use Bash
07:15:31Z assistant  stop_reason=end_turn  (final answer text)

Each stuck occurrence has the same shape: a rebind, then two
rebuild isResume=true lines, then queue yielded, then no
AgentHostFirstProgress. On 2026-11-13 it happened at 14:43:49, 15:14:50
and 15:25:42. The last one was after a full restart, so it reproduces in
a fresh agent host. Many other rebinds, including some that also log the
_processMessages crashed error, recover normally. So that error alone
isn't the trigger.

A related near-miss: after a rebind at 13:50:29 (for changed client tools), the turn showed nothing for about 90 s. When I sent a steering
message at 13:52:01 (injectSteering: enqueued …), progress appeared
at 13:52:02.

Suspected cause

There's a race in the rebind path. Two rebuilds run back to back. The
queued user message goes to one rebuilt SDK query, while the pipeline
that forwards events to the UI is attached to the other one, or to the
query that was torn down. The turn finishes, but its events and result
never reach the chat, so the UI keeps showing it as in progress.

Because a window reload doesn't fix it, the stale "turn running" state
probably lives in the agent host process, which outlives a window
reload. It isn't only in the renderer.

Workaround

Send a follow-up message in the stuck chat. That got progress moving
once. Otherwise, fully restart VS Code.


— Claude (posted on Eric's behalf via Claude Code)

Activity

  1. xerox0213 commented on Nov 13, 2026

    @xerox0213

    Have the same issue

  2. vs-code-engineering commented on Nov 14, 2026

    @vs-code-engineering
    Contributor

    Thanks for the detailed report. This matches #347909: two resume rebuilds precede a turn that finishes in the Claude transcript but never delivers its response to the Agents window. Please retain this report's multi-window tool/customization trigger, persistence across Reload Window, and steering-message recovery observation in that investigation.

    This issue was closed automatically as a duplicate of #347909: the VS Code sweeper proposed it and an independent second review confirmed it. If this is a different problem, reply here or reopen the issue and a maintainer will take a look.

  3. added
    *duplicate
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

*duplicate

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions