Table of Contents
Key Takeaways
- Budget 20 images per session, not per message. Past 20 image blocks in one request, every image in that request falls under a stricter dimension limit, and the hard ceiling is 100 images on models with a 200k-token context window.
- Old screenshots keep counting. Anthropic's docs say all image blocks count, including images resent from earlier turns and images inside
tool_resultcontent. - A Retina screenshot is expensive. At
ceil(width / 28) x ceil(height / 28)visual tokens, a 3840x2160 capture hits the documented 4,784 token cap on the high-resolution tier. Ten of them is 47,840 tokens before the agent reasons about anything. - Agents spend your image budget on your behalf. Cursor's own forum has a cloud agent abandoning GUI verification after hitting the provider cap of 100 images and documents.
- Structured text has no image cap. An accessibility tree of a typical app window is 1 to 5 KB, roughly 250 to 1,200 tokens, and it carries exact button labels instead of OCR guesses.
- Frames by path beat frames inlined. Stash caps a recording at 30 interaction-anchored key frames and hands the agent absolute paths, so it loads the 5 to 15 that matter instead of all 30.
The Budget That Works
Treat images as the scarcest thing in the session. Here is the rule I work to on a long Claude Code or Cursor run:
- One screenshot for the thing you are actually looking at. The visual state, the misaligned button, the broken chart.
- Everything else as text. App, window title, URL, OS version, open file, cursor line, terminal working directory, the last few commands and their output, your annotation shapes, and the recording timeline.
- Frames on request. Hand the agent paths to key frames and let it read the two or three it decides it needs.
- Start a fresh thread when the visual work is done. Images you pasted 40 minutes ago are still in every request you send now.
That budget is not a preference. It falls straight out of the published limits, and those limits are tighter than most developers assume.
The Documented Limits
The numbers below come from the Claude Platform vision documentation, read on November 28, 2026.
| Limit | Value |
|---|---|
| Images per API request | 100 for models with a 200k-token context window, 600 for all other models |
| Images per turn on claude.ai | 20 |
| More than 20 image blocks in a request | A stricter per-image dimension limit applies to every image in that request |
| Documented fix for that case | Resize so neither dimension exceeds 3,000 px, or keep the request to 20 or fewer image and document blocks |
| Maximum dimensions | 8000x8000 px |
| Maximum file size | 10 MB base64-encoded on the Claude API, 5 MB on Amazon Bedrock |
| Visual token cost | ceil(width / 28) x ceil(height / 28), capped at 1,568 tokens on the standard tier and 4,784 on the high-resolution tier |
The high-resolution tier applies to Claude 4.7 and later, which covers everything a working agent runs on today, including Opus 5.5 and Fable 5.2. More resolution means more detail reaches the model, and it also means a single screenshot can cost 4,784 visual tokens.
"Too Many Images or Documents" Counts the Whole Request
That error counts every image in the conversation, not the one you just attached. Each API call resends the whole thread, so the image count is cumulative across the session. Anthropic's documentation is explicit that all image blocks count toward the threshold, including earlier-turn images you resend and images inside tool_result content.
That last part is the one that bites. Your agent takes screenshots too. A Cursor user reported exactly this on the Cursor forum on April 23, 2026, after a cloud agent quit verifying a Chrome extension build:
"I attempted GUI verification, but the cloud computerUse environment is still blocked by the same provider cap (maximum of 100 images/documents), so I couldn't capture fresh UI evidence in this run."
The user said the cap appeared after three or four replies, with only 7 images and 1 video generated in the first reply. Cursor's Kevin Neilson answered in the same thread that the limit "is coming from the underlying GUI/computer-use provider limit, not from files in your repo," and then made the sharp point a day later:
"the image maximum is not just images that are surfaced and visible to the user"
So the screenshots the agent takes on its own, during work you never see, draw down the same budget as the ones you paste. You can run out of images without ever attaching one.
What One Screenshot Actually Costs
Anthropic's vision docs describe the accounting plainly: "Each patch is a 28x28-pixel block of the image, referred to as a visual token." The published table gives you the real prices.
| Capture size | Standard tier | High-resolution tier |
|---|---|---|
| 1000x1000 | 1,296 tokens | 1,296 tokens |
| 1920x1080 | 1,560 tokens | 2,691 tokens |
| 2000x1500 | 1,564 tokens | 3,888 tokens |
| 3840x2160 | 1,560 tokens | 4,784 tokens |
A full-screen grab off a Retina display lands in that last row. Twelve of them in one debugging session is roughly 57,000 visual tokens, and none of those tokens tell the model which app it is looking at, which file is open, or which line your cursor is on. It has to infer all of that from pixels, and OCR on small or low-contrast UI text is where vision models hallucinate button labels.
Compare that with an accessibility tree for the same window. For a typical app window it runs 1 to 5 KB of structured text, roughly 250 to 1,200 tokens, and the button labels are exact because they came from the UI itself rather than from reading pixels. Same information, a fraction of the cost, and it does not touch the image count at all.
The 21st Image Trap
Capture a region or a window instead of the whole display, and the trap below never springs. Full-screen Retina grabs are what set it.
Somewhere past the twentieth image, a request that looked identical to the last ten gets rejected with an invalid_request_error about many-image requests. Nothing changed about the image you just sent. The request crossed 20 image blocks, so the stricter per-image dimension limit now applies to every image in it, including the ones you sent an hour ago. A 3840 px wide capture that was fine as image number 8 fails the entire request as image number 21.
Region captures stay well under the dimension limit, and they keep the running count lower because you stop grabbing three windows to show one button.
Text-First Capture Context
Stash sends the context as text and keeps the pixels optional. That is the whole design.
Every Stash screenshot carries its context as data, not just as pixels. App name, window title, browser URL, OS version, display and scale factor, appearance, timestamp, and an 8-character capture ID go into a thin banner on the image and into XMP metadata inside the PNG. For editor and terminal captures it also records the accessibility tree, the active file path and language, the cursor line and column, the visible buffer text, the shell working directory, and recent commands with their output. Your arrows and rectangles are exported as shape metadata, so the agent reads them as your callouts instead of guessing whether that arrow belongs to the app's toolbar.
A local MCP server over a Unix domain socket exposes five tools: list_recent, search, get_capture, get_bundle, and render_plain. Three of them are the image budget in practice.
list_recentreturns about 100 tokens per capture, so the agent confirms it has the right one before committing to anything larger.render_plaingives a plain-text rendering of a capture for inline paste, which is often where an image was never needed in the first place.get_bundlereturns a recording's structured report plus absolute paths to its key frames. The agent reads the timeline first and pulls frames only when a frame answers something the text cannot.
Recordings are where the arithmetic gets lopsided. A 5-minute capture at 30fps is about 9,000 raw frames. Stash hard-caps each recording at 30 key frames anchored to focus transitions, clicks, drags, and state changes, and tags each one start, interaction, or end. The report for a real 5 minute 30 second session with 2,222 interactions is roughly 22 KB, about 6,000 tokens, with every click coordinate, every keyboard shortcut, every clipboard copy and its literal text, each app switch, and the voice transcript inline with timestamps. Scroll events get aggregated into about 20 burst lines rather than 2,222 rows.
In that session the agent typically reads 5 to 15 of the 30 frames. Ten image blocks, against the 9,000 frames the video actually holds and the 30 a chat client would make you attach up front. The agent also ends up with the things pixels never carried: what you copied, what you said, where a spinner stuck for more than 3 seconds.
One more detail that matters for long sessions. The capture ID in the banner is addressable, so a subagent can be handed an ID instead of an image and fetch what it needs itself. Text in, image count unchanged.
The Bottom Line
Images are capped, text is not. The published ceiling is 100 image blocks per request on a 200k-context model, the stricter dimension rule kicks in after 20, and your agent is spending that budget on screenshots you never see. Send one image of the thing you are looking at, send everything else as structured text, and keep frames behind file paths so the agent pulls them on demand. Stash does that by default: context banner and XMP on every screenshot, an accessibility tree and dev context where it exists, a structured report for every recording, and a local MCP server so none of it leaves your machine. Download Stash for free and set it up with Claude Code or Cursor in one command.
Frequently Asked Questions
What does "Request contained too many images or documents" mean?
Your request carried more image and document blocks than the model accepts. The Claude API documentation puts that at 100 for each request on models with a 200k-token context window, and 600 for each request on all other models. Every image in the conversation counts, not only the one you just attached, because each call resends the whole conversation.
Do screenshots from earlier turns still count toward the limit?
Yes. The documentation states that all image blocks count toward the threshold, including images resent from earlier turns and images inside tool_result content. A coding agent that screenshots its own work adds to the same count, which is why the ceiling shows up mid-session rather than on one message.
How many tokens does one screenshot cost?
Multiply the patch counts: ceil(width / 28) x ceil(height / 28) visual tokens, since each patch is a 28x28-pixel block. That is capped at 1,568 visual tokens on the standard tier and 4,784 on the high-resolution tier, and the documented table prices a 1920x1080 capture at 1,560 or 2,691 tokens depending on tier.
Does resizing screenshots fix the image cap?
Resizing fixes the dimension error, not the count ceiling. Past 20 image blocks, the stricter per-image dimension limit applies to every image in the request, and the documented fix is to resize so neither dimension exceeds 3,000 px or keep the request to 20 or fewer image and document blocks. The 100-image ceiling is a separate rule and resizing does not move it.
Can an agent understand a capture without loading the image?
Yes, when the capture ships structured text next to the pixels. Stash sends app, window title, URL, accessibility tree, cursor position, open file, annotation shapes, and a recording's full timeline as text over a local MCP server, so the agent reasons from text and loads a frame only when it needs to see one. Text blocks do not count against the image limit.
Does this apply to Cursor as well as Claude Code?
Yes, because the cap belongs to the model provider, not the editor. Cursor's own forum thread on the 100 image and document cap traces it to the underlying provider, and the fix is the same in both tools: fewer images, more structured text, and frames fetched by path when the agent asks for them.
References
- Claude Platform documentation, Vision: image limits, dimension rules, and the 28x28 patch token formula. platform.claude.com/docs/en/build-with-claude/vision
- Cursor Community Forum, "Cloud agent relatively quickly gives up on live testing due to computeruse exceeding 100 images/documents," April 23, 2026. forum.cursor.com
- Stash capture protocol,
stash-1. yourstash.ai/protocol