[BUG] VSCode Extension Crashes in Restart Loop with Large Conversation History (500+ sessions, 488MB)Retry
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?
Bug Description
The Claude Code VSCode Extension becomes completely unresponsive and enters a crash-reboot loop when the conversation history in ~/.claude/projects/ becomes large (500+ sessions, ~488MB).
What Should Happen?
Symptoms
- Extension Non-Responsive: Extension UI becomes completely unresponsive after loading
- Abnormal Termination and Restart Loop: Extension repeatedly crashes and attempts to restart
- MCP Server Initialization Failure: Console shows
MCP error -32601: Method not foundfor the internalclaude-vscodeMCP server - VSCode Hangs: In severe cases, VSCode itself becomes sluggish or unresponsive
Error Messages/Logs
### Error Logs
[ERROR] MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found
Steps to Reproduce
Steps to Reproduce
- Use Claude Code CLI extensively over time (create 500+ conversation sessions)
- Accumulate ~488MB of conversation history in
~/.claude/projects/ - Install and launch Claude Code VSCode Extension
- Extension fails to initialize properly and enters crash-reboot loop
- Extension becomes unresponsive, VSCode may hang
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
- not working after long commination
Claude Code Version
latest
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Root Cause
The extension appears to attempt loading ALL conversation history on startup without:
- Pagination
- Lazy loading
- Timeout handling
- Size limits
With 500+ sessions (488MB), this causes the initialization process to fail, resulting in MCP server errors and extension crashes.
Workaround
Delete conversation history folders:
rm -rf ~/.claude/projects/
rm -rf ~/.claude/debug/
rm -rf ~/.claude/todos/
rm -rf ~/.claude/shell-snapshots/
This freed 488MB and immediately resolved all issues.
Expected Behavior
The extension should:
- Implement pagination/lazy loading for conversation history
- Add size/count limits for history loading
- Provide graceful degradation when history is large
- Show meaningful error messages (not misleading MCP errors)
- Offer built-in history cleanup/archival functionality
Additional Notes
This is an edge case that only affects power users who extensively use Claude Code CLI. Most users won't encounter this issue, which may be why it hasn't been caught in testing.
However,
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗