[BUG] An image in the conversation exceeds the dimension limit for many-image requests (2000px). Start a new session with fewer images.
Status Closed — duplicate
Maintainer reply ✓ Yes — claude[bot]
Workaround ✓ Mentioned in thread ↓
Activity 11 comments · opened Mar 26, 2026 · closed May 1, 2026
💡 Likely answer: A maintainer (claude[bot], contributor)
responded on this thread — see the highlighted reply below.
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
An image in the conversation exceeds the dimension limit for many-image requests (2000px). Start a new session with fewer images.
What Should Happen?
it should continue without breaking conversation
Error Messages/Logs
Steps to Reproduce
An image in the conversation exceeds the dimension limit for many-image requests (2000px). Start a new session with fewer images.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
4.6
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
11 Comments
Same issue here. Running Claude Code v2.1.88 on Linux (Debian) with Opus 4.6.
This happens frequently in longer sessions where screenshots are taken (e.g. using browser automation MCP tools for web development). After a few screenshots accumulate in context, the session becomes unusable with:
Problems:
/compactdoesn't reliably fix it — the oversized images often persist in context after compactionExpected behavior:
/drop-image 3) without losing the rest of the conversation/compactshould strip all images from context as a recovery mechanismSame shit. Does everyone at Anthropic use low-resolution screens?
<img width="1154" height="342" alt="Image" src="https://github.com/user-attachments/assets/34551e99-ce8c-4286-addc-ad8b843a02e9" />
<img width="414" height="298" alt="Image" src="https://github.com/user-attachments/assets/c83f1a62-694f-430e-bf54-95e1998badca" />
have had this happen multiple times on multiple platforms. Including Mac OS
Surely this isnt that hard to fix. The main challenge seems to be retina display using the chrome extension or chrome dev tools because they dont set the pixels like playwright does.
Two workarounds for anyone hitting this on macOS while waiting for a real fix.
Option A — ask Claude Code to build the hook for you. Paste this prompt:
It'll write the script, wire it up, and run a smoke test. About 2 minutes.
Option B — drop in the ready-made script.
~/.claude/hooks/resize-oversized-image.sh:Wire it into
~/.claude/settings.json:chmod +xthe script. Needssips(macOS built-in) andjq. For Linux, swapsips -Z 1440formagick mogrify -resize '1440x1440>' "$file".Not a substitute for the real fix — Claude Code should cap image dimensions at ingestion, before they enter context — but it stops sessions getting bricked while you wait.
Update on my earlier comment about the PreToolUse hook workaround:
The hook does NOT catch Chrome/Playwright MCP screenshots. The hook I shared (resize images >2000px before
Read) only fires when Claude calls theReadtool on a file path. MCP screenshot tools likemcp__claude-in-chrome__computer(action=screenshot) return the image as base64 inline in the tool result — it never touches the filesystem, so the hook can't see or modify it. I hit the 2000px error again mid-session after thinking it was solved. Worth knowing if anyone else tries this approach.Workaround that actually works on a Retina Mac: force Chrome to run at 1x DPR so screenshots capture at CSS pixel size, not 2x. Fully quit Chrome, then relaunch with:
Verify with
devicePixelRatioin any tab's console — should return1. A 1440×900 viewport then captures at 1440×900 instead of 2880×1800, well under the 2000px cap.Trade-off: every page in Chrome now looks slightly blurry on Retina (Chrome is rasterising at half physical density). Reversible by quitting Chrome and relaunching without the flag. I'll probably use a second browser (Safari/Arc/Firefox) for normal browsing and keep Chrome in 1x mode for Claude Code audit sessions. Not ideal, but it's a reliable fix until Chrome MCP exposes a
dprormax_dimensionparameter, or the core 2000px limit is lifted.Other options I considered but haven't tried yet:
Really the root cause is that image dimension limits get exceeded from tool outputs Claude has no control over. A
max_image_dimensionsession setting that auto-downsamples inline image tool results on the Claude Code side would close this for everyone regardless of which MCP they use.+1, Windows 11 / Claude Code latest. Hit this reading local PNG figures from disk (not MCP screenshots) — a LaTeX report session where I asked Claude to view a 2400px figure export via the
Readtool. Single oversized image killed the request with the exact error text, even though only ~3–4 images were in context prior. Retry got the same error on the next tool call, session was effectively bricked.Subtle detail the thread may not have covered: the session was still interactively responsive (I could type the next turn), but every subsequent request round-tripped the same 400. So it's not that the turn fails — the whole context is poisoned by the oversized image for all future turns.
Concrete ask matching the thread consensus: auto-downsample on ingest at the
Read/tool-result boundary (longest edge → 2000px), before the image enters context. Hooks help on disk reads but don't help the MCP inline-base64 case that jezweb called out above.I get this after like 2 images, have to start an entirely new session, quite annoying as i only get a few minutes into a session and send a screenshot and the entire session is borked after it hits the api error.
Adding a data point + workaround for anyone hitting this on macOS:
Trigger: macOS screenshots taken at native retina DPI are typically 3024×1890+ on 14"–16" MacBooks, which exceeds the 2000px many-image limit. After ~5–8 such pasted/dragged screenshots accumulate in one session, the API rejects every subsequent turn — even text-only ones — because the offending images get re-sent from history.
Workaround (until Claude Code does this client-side):
``
bash
``mkdir -p ~/Screenshots
defaults write com.apple.screencapture location ~/Screenshots
killall SystemUIServer
launchdLaunchAgent that polls~/Screenshotsevery 10 seconds and runssips -Z 1900 <file>on any PNG over the threshold. The user-context shell granted~/Screenshotsaccess via TCC at first write, so launchd inherits it.Result: every screenshot is downscaled to ≤1900px on its long edge before you can drag it into Claude Code. The deadlock stops happening.
Watching
~/Desktopdirectly with launchd does not work — TCC blocks launchd-spawned processes from reading~/Desktopeven when the user's terminal has access. That's why the workaround moves screenshots to a fresh non-protected folder.Doesn't fix the underlying bug, but unblocks the workflow.
This is a duplicate of #13480, which was fixed as of version 2.1.126.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.