Prompt is too long (context window exceeded) — page 3

The assembled prompt exceeded the model context window.

322 issues · 20 open · 302 resolved (94%) · first seen Feb 24, 2025

First response · account

What to do now

Most likely: Authentication, usage state or session size blocked the request.

  1. Check the exact account, organization and usage window currently selected.
  2. Try a new short session before deleting credentials or local history.
  3. 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. 33 new reports in the last 90 days vs 95 in the 90 before — -65%. The open backlog peaked at 52 in 2025-12 and sits at 20 today.

0 13 26 39 52 2025-022025-082026-022026-08
2025-02 — First reports2025-12 — Peak backlog (52 open)2026-04 — Most new reports (40)

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

141 of these reports name the Claude Code build they were running, spanning 72 releases. Heaviest reporters:

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 21 days across 302 closures. Of the 302 closures with a recorded reason, 16% were closed as completed and 255 as not-planned or duplicate. The most recent completed fix landed in 2026-08.

Workarounds reported by the community

47 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 322 matches; the statistics above cover all 322.

Related aggregations

  1. Claude usage limit reached

    173 issues
  2. Auto-compact / compaction failed

    379 issues
  3. OAuth token expired / refresh failed

    344 issues
  4. Invalid API key (invalid x-api-key)

    99 issues
  5. Your credit balance is too low

    76 issues
  6. API Error 400 (invalid_request_error)

    2,591 issues