[BUG] VS Code: opening a session whose transcript exceeds 2 GiB crash-loops the extension host
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Opening a long-running session from the Claude Code panel crashes the VS Code extension host about 15 s after the webview sends get_session_request with purpose: "transcript_open". VS Code restarts the host, the panel restores the same session, and it crashes again: "Extension host terminated unexpectedly 3 times within the last 5 minutes". Downgrading the extension did not help. Other sessions open normally.
The session transcript ~/.claude/projects/<project>/<session-id>.jsonl is 2.26 GB. The session kept working while it stayed open and broke on the first reopen after a VS Code restart. More than half of the file (1.3 GB) is duplicated rows from #92089, so long sessions reach this size much sooner than expected.
What Should Happen?
Opening or resuming a session should not need the whole transcript (the model only needs the part after the last compact_boundary), or at least it should fail gracefully for that one session instead of taking down the extension host. The panel should not keep restoring a session that just crashed the host.
Error Messages/Logs
main.log: Extension host with pid 8144 exited with code: 0, signal: unknown.
renderer.log: Extension host (LocalProcess pid: 8144) terminated unexpectedly.
Claude VSCode.log, right before each crash:
Received message from webview: {"type":"request","request":{"type":"get_session_request","sessionId":"…","purpose":"transcript_open"}}
Steps to Reproduce
- Have a session whose
.jsonltranscript is over 2 GiB (for example a long session with many auto-compactions, see #92089). - Open it from the Claude Code panel in VS Code.
- After ~15 s the extension host crashes, restarts, the panel reopens the session, and the loop repeats.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.288
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Workaround: copy the lines from the last compact_boundary to the end into a new <new-uuid>.jsonl with sessionId replaced. The result is a 6.6 MB session that resumes with the same model context.
VS Code 1.140.0, Windows 11 Pro 10.0.26200, x64.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗