[BUG] Feature request: Context overflow warning and graceful handling before crash
Resolved 💬 3 comments Opened Dec 10, 2025 by YvesMartinSWD Closed Dec 14, 2025
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?
Claude Code crashes without any warning or error message when conversations become too long. Users have no visibility into context usage and lose significant work when this happens.
What Happened
- Long coding session (conversation file grew to 53MB)
- Chat suddenly crashed/froze with no error message
- No warning before the crash
- Had to manually dig through
~/.claude/projects/to find conversation history - Happened twice in a few days
Environment
- Claude Code in VSCode extension
- macOS
Expected Behavior
- Context usage indicator - Show how much of the context window is used (e.g., "Context: 75% full")
- Warning at threshold - Alert users at 70-80% capacity: "Session is getting large, consider starting fresh or summarizing"
- Auto-checkpoint - Save conversation state before potential overflow
- Graceful failure - If crash is unavoidable, show clear error message with recovery options
- Easy resume - "Chat: Resume Conversation" option in VSCode Command Palette
Current Workarounds
- Manually check
~/.claude/projects/for.jsonlfiles - Use
claude --resume <id>from terminal (requires knowing the ID) - Start fresh sessions frequently (lose context)
Impact
- Hours of work and context lost
- No way to predict or prevent crashes
- Poor user experience for long coding sessions
Suggested Solutions
- Add context meter to UI
- Implement auto-summarization when approaching limits
- Add "Chat: Show Chats..." with resume capability in VSCode
- Save checkpoint before any risky operation
What Should Happen?
Suggested Solutions
- Add context meter to UI
- Implement auto-summarization when approaching limits
- Add "Chat: Show Chats..." with resume capability in VSCode
- Save checkpoint before any risky operation
Error Messages/Logs
Steps to Reproduce
- Start a new Claude Code chat in VSCode
- Work on a complex coding task for several hours (multiple file edits, tool calls, screenshots)
- Continue the session until the conversation file reaches ~50MB+ (check in
~/.claude/projects/) - At some point, the chat freezes or crashes without any error message
- The VSCode chat panel becomes unresponsive or shows blank screen
- No way to resume from VSCode - must use terminal command `claude
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.64
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗