claude-code - 💡(How to fix) Fix [BUG] VS Code extension hides assistant messages after mid-turn API error + harness retry

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

All assistant content from the same logical turn should render, including content produced after a transient API error and harness-driven retry.

Error Messages/Logs

  1. An API Error: The socket connection was closed unexpectedly message appears as a synthetic assistant entry. Renderer appears to treat the synthetic API Error assistant entry as the end of the turn and stops drawing subsequent records.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When viewing a past session in the VS Code extension transcript, an entire assistant turn (including its final text response and many tool calls) is invisible in the UI, even though the underlying .jsonl session file contains all the data correctly.

  • Claude Code VS Code extension
  • Linux (WSL2), Ubuntu

What Should Happen?

All assistant content from the same logical turn should render, including content produced after a transient API error and harness-driven retry.

Error Messages/Logs

Steps to Reproduce

The affected turn has this shape in the JSONL:

  1. Assistant issues several tool calls (e.g. WebSearch).
  2. Tool results return.
  3. An API Error: The socket connection was closed unexpectedly message appears as a synthetic assistant entry.
  4. The harness automatically retries; many more tool calls (Write, Bash, etc.) succeed.
  5. The assistant produces a final long-form text response.

In the VS Code transcript renderer, only items from step 1 are shown. Steps 2–5 are silently dropped. The user sees orphan tool-call entries with no follow-up, which looks like the assistant never replied.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.133

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

Actual

Renderer appears to treat the synthetic API Error assistant entry as the end of the turn and stops drawing subsequent records.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] VS Code extension hides assistant messages after mid-turn API error + harness retry