claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

VSCode extension renderer disconnects from live stream during long multi-step tasks; work completes successfully in background

Open tianbester-ZA opened this issue 6 months ago • 2 comments

Environment

  • Claude Code VSCode extension: 2.1.142 (darwin-arm64)
  • VSCode: 1.120.0
  • macOS: 26.5 (Build 25F71), Apple Silicon (arm64)
  • Model: Opus 4.7 (1M context variant)
  • Effort level: high

Symptom

During complex multi-step tasks (long streaming responses with multiple tool calls), the Claude Code panel in VSCode disconnects from the in-flight stream. The UI shows no further output and appears stuck.

Reproduction

  1. Open a Claude Code session in the VSCode panel.
  2. Issue a complex prompt that requires multiple sequential tool calls over a sustained streaming response (e.g. a multi-account diagnostic, or a multi-file refactor).
  3. Mid-response, the renderer loses its connection to the stream — no further tokens or tool-call indicators appear in the UI.
  4. Closing the panel and reopening the same session restores full visibility: all tool calls completed successfully, files were written, and the assistant's final response is present.

Expected behavior

The renderer should remain connected to the live stream for the full duration of the response, or should automatically reconnect without requiring a panel close/reopen.

Actual behavior

The renderer disconnects mid-stream but the extension host continues processing successfully. The session state on disk (~/.claude/sessions/<id>/) reflects a fully completed turn — tool calls executed, files edited, response stored — even though the UI showed the stream as frozen.

Diagnostic evidence (from Anthropic.claude-code.Claude VSCode.log)

  • [WARN] [Stall] stream_idle_partial lastChunkAgeMs=15001 bytesTotal=786 idleDeadlineMs=300000
  • [INFO] sdk_stream_ended_no_result had_error:true subagent_count:0 message_count:220
  • [WARN] Streaming stall detected: 46.8s gap between events (stall #1)
  • Extension version visible in attribution header switched from cc_version=2.1.141.75a to cc_version=2.1.141.2db mid-session, suggesting an auto-update may have occurred during the affected session.

Network / API check (ruling these out)

  • ping api.anthropic.com: 0% packet loss, ~20ms avg.
  • Fresh TLS handshake + first byte to api.anthropic.com: 33–62ms across 3 trials.
  • No VPN, no HTTP/HTTPS proxy, no Little Snitch / WARP / similar.
  • Anthropic public status: All Systems Operational.

Workaround

Close the affected session panel and reopen the same session by ID. All work completed in the background is visible. No data is lost — only the live view of the stream.

Frequency

Reliably reproducible on multi-step tasks across multiple fresh Claude Code sessions. Does not reproduce on short/single-tool prompts.

tianbester-ZA avatar May 15 '26 20:05 tianbester-ZA

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/59374
  2. https://github.com/anthropics/claude-code/issues/54434
  3. https://github.com/anthropics/claude-code/issues/59326

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar May 15 '26 20:05 github-actions[bot]

The bug reported by @tianbester-ZA does not resemble the 3 possible duplicate issues flagged. There is no stalling or aborting going on: the requested work completes, but as user you simply do not get any feedback. Your Claude Code screen seems to be stuck on "Thinking" (which is also not blinking anymore). This happens when an interaction is moderately complex. Happened several times in a row for me this evening...annoying.

orbatec avatar May 15 '26 21:05 orbatec