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.
- Start a new session or compact context before retrying.
- Remove large pasted files, tool results or images from the reproduction.
- 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.
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:
- Claude Code v2.1.208
- Claude Code v2.1.201
- Claude Code v2.1.197
- Claude Code v2.1.114
- Claude Code v2.1.112
- Claude Code v2.1.94
- Claude Code v2.1.42
- Claude Code v2.1.4
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).
- [BUG] This error kills the active session: API Error: 413 {"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}}
- [BUG] Keep hitting "Request size exceeds model context window"
- Agent Loading Failure After Version Upgrade to 1.0.80
- API Request Size Exceeds Context Window Limit
- Context window detection fails for third-party Anthropic-compatible providers
- [BUG] Prompt hooks cause exponential payload growth and infinite retry loop, generating 800MB+ debug logs
- [Bug] Anthropic API Error: Request Payload Exceeds Context Window Limit
- Show request body byte usage and preflight pasted/uploaded images before 32MB request_too_large
- [Bug] Anthropic API Error: Usage Policy violation on chemistry computation tasks
- Request-too-large error crashes conversation with no recovery — context and work lost
- Are you able to read that directory for the menu items?
- Here's a concise, technical issue title: "API Request Failure: 400/413 Errors on Text Query Endpoint" This title captures the key technical details: - Specifies the error codes (400 Bad Request, 413 Payload Too Large) - Indicates it's happening on a text
- [Bug] Anthropic API Error: 413 Request Entity Too Large causing infinite loop
- [Bug] Anthropic API Error: Request exceeds maximum size causes infinite loop
- [Bug] Compact Command Fails with 413 Request Too Large Error
- Request Size Exceeds Anthropic API Context Window for Claude Opus
- [BUG] Request size exceeds model context window
- Shell Context Mixing: Bash Snapshots Incorrectly Injected into PowerShell Commands
- Request Payload Exceeds Maximum Size Limit
- [Bug] Legitimate biological content incorrectly flagged by safety filters
- [BUG] API 413 error loop
- [BUG] Calls to GH CLI are randomly throwing API Error: 413
- [Bug] Anthropic API Error: Request exceeds maximum size (413)
- [Bug] Anthropic API Error: Request exceeds maximum size (413)
- [Bug] Anthropic API Error: Request Size Limit Exceeded (413)
- [Bug] Anthropic API Error: Request exceeds maximum size (HTTP 413)
- [Bug] Anthropic API Error: Premature request_too_large on Manual Compact
- [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
- Bug Report
- [Bug] AskUserQuestion tool causes token loop with "court" repetition
- [BUG] Image upload causes "request_too_large" error (413) and permanently breaks chat session on Claude-Code 2
- [Bug] Agentic session fabricates user instructions and writes them to persistent memory without verification markers
- [Bug] Model refusing requests for legitimate security application
- [Bug] Output truncation: Large portions of Claude's response not displayed in terminal