Prompt is too long (context window exceeded) — page 3
The assembled prompt exceeded the model context window.
338 issues · 25 open · 313 resolved (93%) · first seen Feb 24, 2025
First response · account
What to do now
Most likely: Authentication, usage state or session size blocked the request.
- Check the exact account, organization and usage window currently selected.
- Try a new short session before deleting credentials or local history.
- If the state is inconsistent across machines, preserve diagnostics and re-authenticate once.
These are conservative triage steps, not an official Anthropic fix. Use the issue and workaround evidence below before making a destructive configuration change.
Is this getting better or worse?
This class of problem is converging. 34 new reports in the last 90 days vs 65 in the 90 before — -48%. The open backlog peaked at 52 in 2025-12 and sits at 25 today.
Derived by counting each matching issue from its creation date until it closed. First-party
computation over the anthropics/claude-code tracker — the trend is not published
anywhere upstream.
Which builds report this
154 of these reports name the Claude Code build they were running, spanning 83 releases. Heaviest reporters:
- Claude Code v2.0.76
- Claude Code v2.1.220
- Claude Code v2.1.114
- Claude Code v2.1.126
- Claude Code v2.1.42
- Claude Code v2.1.7
- Claude Code v2.1.229
- Claude Code v2.1.150
Report volume, not a defect count: an issue can mention a build without that build having caused the failure. Versions come from the version string in the bug-report template, matched against real published tags.
Do these get fixed?
Median time to close is 26 days across 313 closures. Of the 313 closures with a recorded reason, 15% were closed as completed and 265 as not-planned or duplicate. The most recent completed fix landed in 2026-10.
Workarounds reported by the community
52 of these issues post a workaround someone says worked. The highest-engagement ones:
- [BUG] Github Issue Prompt Too Long
- …e - Maintain sliding window of detailed context --- Current Workarounds Users must manually: - Run every 50-100 messages - Avoid reading large files entirely - Use / when reading files - Start new sessions frequently - M…
Found in the description of #23377 · still open - Subagents fail with 'prompt is too long' when user has many MCP servers (tool definitions exceed 200k)
- …rune least-relevant MCP tools rather than failing silently. Workarounds - Pass explicitly on Agent calls (costs more quota) - Reduce MCP servers in (defeats the purpose of having them) - Move servers to project-level con…
Found in the description of #37793 · still open - [BUG] Keep hitting "Request size exceeds model context window"
- happens more on Opus (default setting)- as a temp workaround i noticed you can set it to sonnet ask something and then change back to "default" model setting. Sonnet seems not causing issues for me at least.
Found in the thread of #6357 · resolved - /goal Stop hook fails with "Prompt is too long" when goal text is large
- …nd blocks the Stop. Subsequent Stops repeat the same error. Workaround that recovers cleanly: /goal clear. After clearing, Stop works again. Short single-sentence goals do not trigger the bug. Claude Model Opus Is this a…
Found in the description of #58192 · resolved - Explore agent always fails with "Prompt is too long" when many MCP tools are connected
- …ntext since Explore is specifically for codebase navigation Workaround Use and tools directly, or use the Agent type. Environment - macOS (Darwin 25.2.0, arm64) - Claude Code CLI - Model: claude-opus-4-6 (1M context) - ~…
Found in the description of #38928 · still open
Excerpts are quoted from the linked issue so you can judge relevance before opening it. Threads that only ask for a workaround, or report that there is none, are excluded. These are community suggestions, not official guidance from Anthropic — read the full thread before applying one.
Matching issues 201–300
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 338 matches; the statistics above cover all 338.
- [Bug] Windows Auto-Compact triggers prematurely with "Conversation too long" error
- [Bug] Repeated task execution failures and incorrect behavior validation
- [Bug] Long-running output tasks trigger premature context limit with failed compaction
- [Bug] Plugin hook stdout not surfaced to Claude in system messages
- [Bug] Framebuffer output causes accessibility issues without respecting screen dimensions
- [BUG] "Prompt is too long" error when SessionStart hooks inject large context
- Regression: 'Prompt is too long' error interrupts test suite execution
- Auto-compaction race condition on fast machines - context grows faster than compaction triggers
- [Bug] Official LSP plugins missing implementation code in marketplace cache
- [Bug] Files not created while consuming API tokens
- [Bug] Console output renders excessive blank lines between log entries
- [Bug] Infinite compaction loop preventing task execution
- [Bug] Web search functionality not working
- [Bug] Compaction fails with "Conversation too long" error despite available context
- [Bug] Anthropic API Error: Prompt exceeds maximum token limit (191989 > 180000) sonnet[1m]
- [Bug] midway the chat it returns "Context low · Run /compact to compact & continue" previousely it compressed the conversation itself
- [Bug] Unable to compact or continue conversation after message exchange
- [Feature Request] Add support for alternative AI models alongside Claude
- Error message 'prompt is too long' is not actionable
- [Bug] Auto-compact not triggering when context limit reached
- [Bug] Compact fails with "Conversation too long" error on large chat histories
- [Bug] Claude Code attempts to work on multiple issues simultaneously despite single-issue context
- [Bug] Anthropic API Error: Prompt exceeds 200k token limit with Claude 4.5 Sonnet 1M model
- [Bug] Context limit reached with no recovery path when local file exceeds token limit
- [Bug] Unable to process empty bug report
- /compact error in Claude code
- [Bug] Anthropic API Error: Conversation too long during compaction
- [Bug] claude.md context rules not enforced for restricted operations like git commit/push
- [Bug] Compact Command Fails at 50% Memory Utilization
- [Bug] Context Management Failure: Auto-Compact Not Triggering Properly
- [Bug] Context Window Management Fails on Single Message Session
- [Bug] Error Loading Usage Data from Configuration
- [Bug] Context Compaction Failure: Unable to Compact Conversation
- [Bug] Unexpected Context Size Reduction Impacting Workflow Efficiency
- Not able to type after clearing a session with /new
- [BUG] Prompt is too long CRITICAL
- I do not see a specific technical issue or bug report in this message. The text appears to be a personal communication that does not describe a software problem for Claude Code. Without a clear technical issue to address, I cannot generate an appropriate G
- [Bug] Compaction Fails: Conversation Too Long Error
- Bug Report
- [Bug] Claude Incorrectly Redraws SVGs Instead of Direct Insertion
- [Bug] /init command fails to generate CLAUDE.md project configuration file
- [Bug] IDE Diff Approval Adds Entire File to Context Instead of Diff
- infinite loop trying to run multiple bash commands in parallel when one of them was failing
- [Bug] Anthropic API Error: Context Length Exceeded During Codebase Analysis
- [Bug] Context Management Error: Incorrect Context Limit Validation
- [Bug] Context Management Failure After /compact Command
- [Bug] Anthropic API Error: Request Size Exceeds Context Window
- Bug Report Request size exceeds model context window
- [BUG] API Error 413 Request size exceeds model context window
- Request Size Exceeds Model Context Window During Compaction
- Request Payload Exceeds Model Context Window Limit
- Windows: Incorrect /dev/null Redirection Creates Null Files in Bash Commands
- Context Management: Low Context Threshold Triggering Premature Interruption
- Bug Report
- Layout Modification for Characters Tab in 3-Column View
- Anthropic API Request Exceeds Context Limit Maximum Token Threshold
- Anthropic API Context Limit Exceeded During PDF Compaction
- Invalid API Request: Empty Message Content Blocking Compaction
- Context Window Exhaustion: Insufficient Token Space for Continued Execution
- Context Overflow: Unable to Compact Due to Excessive Background Hook Context
- Context Truncation: Unable to Compact Conversation Due to Length Limit
- [BUG] Crash when triggering a prompt provided by MCP
- "Unexpected Code Generation Interruption During Development" This title captures the core issue of the code generation process unexpectedly stopping, while being technical and specific about the problem's nature.
- Context Limit Exceeded When Uploading Large File
- Ability to use /compact from command line when using -c -p
- Subagent auto-compaction uses the main session's context window, so subagents on a smaller-window model are never compacted and die with a 400
- [Bug] Anthropic API Error: Server rate limiting on valid requests
- claude-api bundled skill overflows context on load (~210K tokens in one tool result → "Prompt is too long")
- [BUG] API ERROR
- [Bug] Context limit exceeded prevents prompting and model responses truncated
- [Bug] Claude denies mocking behavior after initial mock response
- [Bug] Anthropic API Error: Server rate limiting requests
- [BUG] When creating an agent via "Create new agent" from the /agents menu, Claude embeds the entire Memory system prompt to the agent file
- [BUG] 2.1.159: autocompact silently disabled for non-remote sessions unless `autoCompactWindow` is set
- Agent/subagent spawn fails with 'Prompt is too long' even for tiny prompts (large MCP tool set)
- [Bug] Anthropic API Error: Prompt is too long in stop hook evaluator
- [Bug] /goal command fails with "Prompt is too long" error above 200k tokens when 1M context window disabled
- [Bug] CLI hangs indefinitely when reading small files
- [BUG] Prompt is too long after compaction
- [Bug] File path handling not respecting Windows conventions in multi-turn interactions
- [Feature Request] Support Ctrl+V image pasting from clipboard in CLI
- [Bug] Subagent spawning fails with xhigh/max reasoning due to prompt length limits
- [Bug] MCP server removal fails after auto-recommendation
- [Feature Request] Long-running project context persistence and state management
- [BUG] API Error Prompt is too long
- Agent tool with isolation:"worktree" silently reuses stale branches on agentId-prefix collision
- [BUG] Windows Desktop App freezes after daily token limit — input locked, banner persists after reset
- [Bug] Claude Code generates non-functional code and wastes tokens without executing tasks
- [Bug] Monitor Events cause tmux session detachment
- [FEATURE] Include per-request peak context usage in sub-agent result data
- [Bug] Sub-agents terminate immediately due to prompt size exceeding context window
- [Bug] Explore agent fails silently with context window overflow from multiple plugins/skills
- [FEATURE] Visible context window usage indicator in Cowork
- agent_progress messages (155 × 80KB) overflow context while /context reports 33% usage
- Multi-session VS Code workflow is fundamentally broken — please dogfood this
- [Bug] Auto-cancel timeout on bug reports at 5 seconds
- [Feature Request] Display context window consumption breakdown with `/context` command
- [Feature Request] Please support iTerm2 inline image protocol for pasted images
- [BUG] exceed context limit
- [Feature Request] Add Railway deployment auto-configuration and documentation