API Error 413 (request_too_large)

The payload exceeded the maximum request size the API accepts.

38 issues · 2 open · 36 resolved (95%) · first seen Jun 14, 2025

First response · session

What to do now

Most likely: The serialized request exceeded the API payload limit.

  1. Start a new session or compact context before retrying.
  2. Remove large pasted files, tool results or images from the reproduction.
  3. Split the operation into smaller requests instead of retrying the same payload.

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. 3 new reports in the last 90 days vs 4 in the 90 before — -25%. The open backlog peaked at 11 in 2025-10 and sits at 2 today.

0 3 6 8 11 2025-062025-112026-042026-08
2025-06 — First reports2025-08 — Most new reports (14)2025-10 — Peak backlog (11 open)

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

11 of these reports name the Claude Code build they were running, spanning 11 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 18 days across 36 closures. Of the 36 closures with a recorded reason, 8% were closed as completed and 33 as not-planned or duplicate. The most recent completed fix landed in 2025-12.

Workarounds reported by the community

7 of these issues post a workaround someone says worked. The highest-engagement ones:

[BUG] This error kills the active session: API Error: 413 {"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}}
…ation history? I wasn't even able to run /compact to try to workaround it. Session is just dead now.
Found in the thread of #8092 · 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
Agent Loading Failure After Version Upgrade to 1.0.80
…mation about which specific agents failed and why Temporary Workaround Until a fix is released, users can: 1. Validate all agent files have proper YAML frontmatter with required fields: 2. Remove or fix problematic agent…
Found in the thread of #5715 · resolved
API Request Size Exceeds Context Window Limit
QUICK tip/workaround: run /export and export your current chat into a file, then using @ make claude read it in a new convo and get all the context back hopefully
Found in the thread of #6365 · resolved
Context window detection fails for third-party Anthropic-compatible providers
…ly. Already done for team memory ( ), could be generalized. Workaround Set in environment to override the auto-detected window for all models. Additional Context - AutoCompact already has a circuit breaker (3 consecutive…
Found in the description of #46416 · resolved

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 1–38

Ranked by community engagement (reactions weighted over comments).

Related aggregations

  1. API Error 400 (invalid_request_error)

    2,591 issues
  2. API Error 500 (internal server error)

    603 issues
  3. API Error 401 (authentication_error)

    441 issues
  4. API Error 429 (rate_limit_error)

    690 issues
  5. API Error 529 (overloaded_error)

    254 issues
  6. API Error 403 (permission_error)

    235 issues