VS Code extension UI freeze after large assistant response — stream-json reader stops re-arming (v2.1.120)

Resolved 💬 3 comments Opened Apr 28, 2026 by mythopoetix Closed May 2, 2026

Summary

Two Claude Code sessions in VS Code froze within ~2 minutes of each other. The Claude binary finished generating in both cases — final assistant responses are fully present in the JSONL transcripts on disk — but the VS Code extension UI stopped rendering output and stopped accepting new input.

Extension version: anthropic.claude-code v2.1.120 (darwin-arm64)

---

Environment

| | |
|---|---|
| Host OS | macOS Darwin 24.2.0 (arm64) |
| Editor | VS Code 1.117.0 |
| Extension | anthropic.claude-code v2.1.120 (darwin-arm64) |
| Model | claude-sonnet-4-6 (--model sonnet --effort high) |
| Permission mode | acceptEdits |

CLI flags on affected processes:

--output-format stream-json --verbose --include-partial-messages --resume <id> --model sonnet --permission-mode acceptEdits --effort high

---

Affected Sessions

| Session ID | Last assistant write (UTC) | Final state |
|---|---|---|
| 71a4885a-621f-49cd-988d-b40e8a70b35e | 2026-04-28 01:02:35.978Z | Frozen after 30,191-char text block |
| cedc49bf-76d5-4d32-b639-719aaf8da256 | 2026-04-28 01:00:28.235Z | Frozen after 138-char /close follow-up |

Both freezes occurred within a ~2-minute window on different VS Code windows pointed at the same project.

---

JSONL Evidence

In a healthy session, one last-prompt record is written per user send. In both frozen sessions, the same last-prompt is appended multiple times in a row with no intervening assistant reply and no queue-operation enqueue/dequeue pair — the user's keystrokes reached the JSONL writer but the request was never dispatched.

Session 71a4885a tail:

assistant   01:00:03.405Z  text_len=0        ← begins reply
assistant   01:02:35.978Z  text_len=30191    ← finishes 30 KB HTML block
last-prompt                'Okay, can you give me the HTML code…'  ← duplicate #1
last-prompt                'Okay, can you give me the HTML code…'  ← duplicate #2
                                                                     (no assistant response)

Session cedc49bf tail:

assistant   01:00:25.480Z  Write size=1622   ← writes a file
assistant   01:00:28.235Z  text_len=138      ← short follow-up
last-prompt                'ship it.'        ← duplicate (re-typed during freeze)

---

Process State

Multiple claude processes still alive and idle at time of report (~300 MB each, <1% CPU). They are not crashed or stuck in a hot loop — consistent with "stream completed, extension never read the closing frame and never re-armed the input."

---

Hypothesis

Extension-side IPC/reader bug. Evidence:

  1. Model finished generating in both cases (final assistant records fully present in JSONL with timestamps).
  2. CLI processes still alive and idle — not crashed, not OOM.
  3. Re-typed prompts appear as duplicate last-prompt entries with no queue-operation following → extension input dispatch loop wedged.
  4. Both windows froze within ~2 minutes on the same machine → shared resource (extension host, IPC channel, or stream-json reader state), not two independent failures.
  5. A new VS Code window on the same machine worked normally immediately after.

Suspected area: The --include-partial-messages --output-format stream-json reader on the extension side may not re-arm after a very large final text block (30 KB). The smaller-output session (cedc49bf, 138 chars) may have wedged for a related but distinct reason — the extension offered a /commit slash-command suggestion immediately after the assistant text, which could be relevant.

---

What Would Help Confirm Root Cause

  1. Extension-host log around 2026-04-28 00:55:00Z – 01:05:00Z
  2. Whether --include-partial-messages with large terminal frames has a known edge case in v2.1.120
  3. Whether a single extension host serving multiple concurrent project sessions can dead-lock when one session emits a large frame

---

Workaround

For large code/HTML artifacts meant for copy-paste: use the Write tool to write to a file on disk rather than emitting the artifact as inline chat text. The artifact then survives a UI freeze.

---

Report prepared from client diagnostics filed by Joseph Hawley (joseph@cncmleadership.org). Raw JSONL paths available on request.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗