[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

  1. Context usage indicator - Show how much of the context window is used (e.g., "Context: 75% full")
  2. Warning at threshold - Alert users at 70-80% capacity: "Session is getting large, consider starting fresh or summarizing"
  3. Auto-checkpoint - Save conversation state before potential overflow
  4. Graceful failure - If crash is unavoidable, show clear error message with recovery options
  5. Easy resume - "Chat: Resume Conversation" option in VSCode Command Palette

Current Workarounds

  • Manually check ~/.claude/projects/ for .jsonl files
  • 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

  1. Start a new Claude Code chat in VSCode
  2. Work on a complex coding task for several hours (multiple file edits, tool calls, screenshots)
  3. Continue the session until the conversation file reaches ~50MB+ (check in ~/.claude/projects/)
  4. At some point, the chat freezes or crashes without any error message
  5. The VSCode chat panel becomes unresponsive or shows blank screen
  6. 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗