Request too large (max 32MB)
The message
Request too large (max 32MB)What it means
Every turn resends the whole conversation, and this time the raw request came to more than 32MB. It's a size-in-bytes limit, separate from the token context window, and images and PDFs are what usually fill it.
What to do
Run /compact, which drops accumulated images and attachments. If the message says “compacting cannot make it fit”, press Esc twice to step back past the big turn, or /clear.
The session stops mid-task and prints this instead of an answer:
Request too large (max 32MB). Accumulated images and attachments in the conversation pushed the request over the limit. Run /compact, or double press esc to go back and remove attachments.
Claude Code sends the whole conversation to the API on every turn, and the API refuses a request body over 32MB before it even counts tokens. That makes this a different wall from “Prompt is too long”, which is about the context window. You can be well inside the token limit and still hit this one, because a screenshot is small in tokens and large in bytes.
What fills 32MB
Almost always it's images and documents that piled up over a long session. In one July report the file being read was 49KB, but about 38 screenshots read earlier in the session were still riding along on every request. Text rarely gets there on its own (a huge pasted log or tool output can).
We read Anthropic's error reference and the 2.1.283 binary. When the request went straight to Anthropic's API, Claude Code now measures the conversation and picks between two wordings:
Request too large (max 32MB; 20.1MB of about 33.4MB is images or documents).Media pushed it over, and Claude Code retries by itself with them stripped out.Request too large for the API's 32MB request limit: ..., so removing attachments or compacting cannot make it fit.The text alone is over, so no retry. It even says how much of it is images, often "none of it".
Through a proxy, a gateway or a cloud provider you get the general message quoted at the top, since Claude Code can't measure what the other side counted.
Getting the session moving again
For the general and media wordings, /compact is the fix. Compacting summarizes the conversation and drops the accumulated images and attachments, which shrinks the next request well under the cap.
For "compacting cannot make it fit", step back instead. Press Esc twice to open the rewind list and go back past the turn that added the big content, or /clear and start over. The docs also suggest pointing Claude at a large file by its path rather than pasting it, so it can read the file in chunks.
Older wordings you might be searching
Before v2.1.212 the message read Request too large (max 32MB). Double press esc to go back and try with a smaller file. and it fired on every turn once images had built up, which is why people found "try a smaller file" useless. Reports from April 2026 quote max 20MB. If you see either, claude update gets you the version that retries on its own.
When it fires on the first prompt
A September 20 report (#95654, still open) has the error on the very first message of a new session with no attachments, behind a self-hosted gateway set in ANTHROPIC_BASE_URL. An April issue made a similar case with a logging proxy that saw no request go out for the failed turns. Neither has a published fix, so if you're on a custom base URL and the conversation is empty, test once with the gateway removed. That tells you which side is producing the refusal.
Other lines the same feature prints
Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.
Request too large (max 32MB). Accumulated images and attachments in the conversation pushed the request over the limit. Run /compact, or double press esc to go back and remove attachments.Request too large (max 32MB). Double press esc to go back and try with a smaller file.Request too large for the API's 32MB request limitRequest too large (max 20MB)API Error: 413 request_too_large