VS Code extension crashes with 'prompt too long' requiring restart
Bug Description
The Claude Code VS Code extension repeatedly crashes/becomes unresponsive with a "prompt too long" error, requiring a full VS Code restart to recover. This has occurred approximately 5 times over the past few days during normal usage.
Environment
- OS: Windows 11
- VS Code: Latest stable
- Claude Code: Latest version (VS Code extension)
- Model: Claude Opus 4.6
- Project size: Large UE5 game project (~19 plugins, extensive CLAUDE.md + rules + memory files)
Steps to Reproduce
- Work in a session with a moderately large project (extensive CLAUDE.md, .claude/rules/, .claude/skills/, and memory files)
- Conduct normal back-and-forth conversation with tool usage (file reads, edits, MCP tool calls)
- After extended usage, the extension hits "prompt too long" and becomes unresponsive
- Only fix is to restart VS Code entirely
Expected Behavior
The extension should handle context window limits gracefully — either by compacting/summarizing older context automatically or by providing a clear recovery path that doesn't require restarting VS Code.
Actual Behavior
The extension crashes/freezes with "prompt too long" and requires a full VS Code restart. No graceful degradation or recovery option is presented.
Impact
- Interrupts workflow requiring full restart (~30-60 seconds lost each time)
- Any unsaved conversational context is lost
- Has occurred ~5 times in ~4 days of active use
- Particularly disruptive during multi-step implementation tasks
Additional Context
The project uses auto-loaded context files (CLAUDE.md, 7 rule files in .claude/rules/, memory files) which consume a significant portion of the context window before any conversation begins. This likely contributes to hitting the limit faster than projects with less configuration.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗