Preflight Checklist
What's Wrong?
Bug: "Prompt is too long" Error Makes Sessions Completely Unusable
Description
The "Prompt is too long" error completely breaks active Claude Code sessions. Once this error appears, every single subsequent input returns the same error message, making the session permanently unusable and forcing users to lose all conversation context.
Severity
🔴 CRITICAL - Session-breaking bug
Environment
- Claude Code Version: Latest (2026-02-05)
- OS: Windows 11
- Model: Claude Sonnet 4.5
- Interface: VSCode Extension
Steps to Reproduce
- Start a coding session with multiple file operations
- Continue conversation for 200+ messages
- Read several files (especially large ones)
- Suddenly receive:
Prompt is too long
- Try to send any message
- Result: Every message returns
Prompt is too long
- Session is now permanently broken
Expected Behavior
✅ Users should receive warnings before hitting the limit
✅ Should offer automatic context management options
✅ Should provide recovery mechanisms (e.g., /clear context)
✅ Should never completely lock a session
Actual Behavior
❌ No warning before the error occurs
❌ No way to recover the session
❌ Every input returns the same error
❌ Must close tab and lose ALL context
❌ Must manually search .jsonl files to recover work
Impact
User Quote (translated from Spanish):
"THERE'S A VERY UNPLEASANT BUG THAT SCREWS UP MY WINDOWS AND PROJECT CONTEXT. SUDDENLY THIS MESSAGE APPEARS 'Prompt is too long' AND YOU CAN NEVER WRITE AGAIN BECAUSE EVERY WORD YOU TYPE RESPONDS WITH THE SAME 'Prompt is too long'. I'M REALLY FED UP WITH THIS BUG"
Real-world impact:
- 🚫 Hours of conversation context lost instantly
- 🚫 Deep work interrupted without warning
- 🚫 Must start from scratch in new session
- 🚫 Users lose trust in Claude Code reliability
- 🚫 Session file: 76 MB / 12,854 messages lost
Proposed Solutions
🔥 Quick Fixes (High Priority)
-
Warning System
- 70% full: "Context filling up - consider clearing"
- 85% full: "Context almost full - action needed"
- 95% full: "CRITICAL: Context nearly full"
-
Emergency Recovery Command
- Add
/recover command that works even when context is full
- Auto-summarizes and clears old context
- Preserves last 20-30 messages
-
Visual Context Indicator
- Progress bar showing context usage
- Color-coded: 🟢 Green (0-60%) → 🟡 Yellow (60-85%) → 🔴 Red (85-100%)
🎯 Long-term Solutions
-
Automatic Context Management
- Auto-summarize old messages at 80% capacity
- Keep recent detailed context
- Store full history but load summaries
-
Smart Context Pruning
- Remove redundant information automatically
- Keep: decisions, code changes, important findings
- Remove: intermediate debugging, repeated reads
-
Streaming Context Window
- Summarize oldest messages as new ones arrive
- Maintain sliding window of detailed context
Current Workarounds
Users must manually:
- Run
/clear context every 50-100 messages
- Avoid reading large files entirely
- Use
offset/limit when reading files
- Start new sessions frequently
- Manually search
.jsonl files to recover context 😞
None of these are acceptable solutions.
Technical Details
Token Limit: ~200,000 tokens
Session Data Location:
~/.claude/projects/[project-name]/[session-id].jsonl
Example Broken Session:
- File:
abdb81bf-58ee-4c29-8005-1c6ec7e30848.jsonl
- Size: 76 MB
- Messages: 12,854 lines
- Lost: Multiple hours of wallet analyzer implementation
Suggested Settings
{
"context": {
"auto_manage": true,
"warn_at_percent": 70,
"auto_summarize_at_percent": 85,
"preserve_recent_messages": 50
}
}
Reproduction Rate
100% - Happens to every user with long enough sessions. This is not an edge case.
Priority Request
This bug severely impacts productivity and user experience. Please prioritize:
- ⚡ Immediate (days): Add warning system
- ⚡ Short-term (1-2 weeks): Add recovery command
- 🎯 Medium-term (1 month): Implement auto context management
- 🚀 Long-term (2-3 months): Redesign context window
Additional Notes
- Affects all users who have long sessions
- Makes Claude Code unreliable for serious development
- Users are extremely frustrated by this issue
- Context recovery is currently painful and manual
Thank you for addressing this critical issue! 🙏
What Should Happen?
05
Error Messages/Logs
Steps to Reproduce
BUG_REPORT_PROMPT_TOO_LONG.md
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
lastest
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
.
Preflight Checklist
What's Wrong?
Bug: "Prompt is too long" Error Makes Sessions Completely Unusable
Description
The "Prompt is too long" error completely breaks active Claude Code sessions. Once this error appears, every single subsequent input returns the same error message, making the session permanently unusable and forcing users to lose all conversation context.
Severity
🔴 CRITICAL - Session-breaking bug
Environment
Steps to Reproduce
Prompt is too longPrompt is too longExpected Behavior
✅ Users should receive warnings before hitting the limit
✅ Should offer automatic context management options
✅ Should provide recovery mechanisms (e.g.,
/clear context)✅ Should never completely lock a session
Actual Behavior
❌ No warning before the error occurs
❌ No way to recover the session
❌ Every input returns the same error
❌ Must close tab and lose ALL context
❌ Must manually search
.jsonlfiles to recover workImpact
User Quote (translated from Spanish):
Real-world impact:
Proposed Solutions
🔥 Quick Fixes (High Priority)
Warning System
Emergency Recovery Command
/recovercommand that works even when context is fullVisual Context Indicator
🎯 Long-term Solutions
Automatic Context Management
Smart Context Pruning
Streaming Context Window
Current Workarounds
Users must manually:
/clear contextevery 50-100 messagesoffset/limitwhen reading files.jsonlfiles to recover context 😞None of these are acceptable solutions.
Technical Details
Token Limit: ~200,000 tokens
Session Data Location:
Example Broken Session:
abdb81bf-58ee-4c29-8005-1c6ec7e30848.jsonlSuggested Settings
{ "context": { "auto_manage": true, "warn_at_percent": 70, "auto_summarize_at_percent": 85, "preserve_recent_messages": 50 } }Reproduction Rate
100% - Happens to every user with long enough sessions. This is not an edge case.
Priority Request
This bug severely impacts productivity and user experience. Please prioritize:
Additional Notes
Thank you for addressing this critical issue! 🙏
What Should Happen?
05
Error Messages/Logs
Steps to Reproduce
BUG_REPORT_PROMPT_TOO_LONG.md
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
lastest
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
.