VS Code extension crashes on startup when most recent session file is large
Resolved 💬 3 comments Opened Feb 7, 2026 by avioing Closed Feb 11, 2026
Description
The Claude Code VS Code extension (v2.1.34, darwin-arm64) crashes on startup when the most recent session .jsonl file is large (~467MB). The extension host terminates unexpectedly, triggering VS Code's extension bisect dialog. The CLI works fine with the same installation.
Steps to Reproduce
- Use Claude Code extensively in a single session until the session
.jsonlfile grows to several hundred MB (in this case, 467MB / 9,781 lines at~/.claude/projects/<project>/<session-id>.jsonl) - Close VS Code
- Reopen VS Code — the extension attempts to load the most recent session and crashes
Observed Behavior
- Extension host terminates unexpectedly on startup
- VS Code log shows:
MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found - The command
claude-vscode.editor.openLastis not found (extension commands never register because initialization fails) - Restarting VS Code, reinstalling the extension, and disabling all other extensions do not help
- The CLI (
claude --resume <session-id>) can eventually load the same session, but takes a very long time
Workaround
Renaming the large session file resolves the issue:
mv ~/.claude/projects/<project>/<session-id>.jsonl ~/.claude/projects/<project>/<session-id>.jsonl.bak
After renaming, the extension starts up normally.
Expected Behavior
The extension should handle large session files gracefully — either stream them, skip loading on startup, set a size limit, or warn the user — rather than crashing the extension host.
Environment
- Claude Code: v2.1.34
- Platform: darwin-arm64 (macOS, Apple Silicon)
- VS Code: latest
- Session file size: 467MB (9,781 lines)
- Other large sessions in the same project: 553MB, 376MB, 238MB
Additional Context
- The session had previously run out of context and was continued via
/resume(summary-based continuation), which suggests long-lived sessions can grow unbounded - The MCP
-32601error appears to be a side effect of the crash, not the root cause - The
/doctorcommand in CLI shows no issues - No conflicting environment variables (ANTHROPIC_API_KEY, MCP_TOOL_TIMEOUT) are set
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗