Bug Description
When a conversation accumulates many images (e.g., analyzing slide decks via DevTools screenshots), Claude Code hits a hardcoded 2000px dimension limit and crashes the session with:
An image in the conversation exceeds the dimension limit for many-image requests (2000px).
Run /compact to remove old images from context, or start a new session.
This is catastrophic in long-running sessions. In our case, 8 hours of work analyzing 100+ presentation slides was effectively destroyed because:
- The session froze ("Baked for 19m 20s" with no output)
- The only suggested recovery (
/compact) destroys the conversation context — which is the entire point of the work
- There is no way to recover the session without losing context
Expected Behavior
- Claude Code should automatically resize images to fit within API limits before sending — it already has resize logic (
Bk function) but it clearly fails in many-image scenarios
- If an image can't be resized, it should skip that image with a warning, not crash the entire session
- The limit should be configurable (e.g.,
imageMaxDimension in settings.json)
- At minimum: graceful degradation, not session destruction
Reproduction
- Open a DevTools-connected session
- Take 30-40 screenshots of Google Slides (typical resolution: 2800-3200px wide)
- Analyze each screenshot with the Read tool
- Around image 35-40, the session crashes with the dimension error
Environment
- Claude Code v2.1.76
- Opus 4.6 (1M context)
- WSL2 / Linux
- DevTools MCP (
chrome-devtools-mcp@latest)
- Screenshots are standard browser resolution (2800-3200 x 1384px)
Current Workaround
We patched cli.js directly — changing WB=2000,ZB=2000 to WB=8000,ZB=8000. This works but gets overwritten on every update.
Suggested Fix
- Make the dimension limit configurable in settings.json
- Ensure the existing resize logic actually works for many-image requests
- Never crash a session over an image dimension — resize, compress, or skip with a warning
- Consider progressive image quality reduction as context fills (lower quality for older images)
A 1M context window AI that crashes over a 3000px image in 2026 is not acceptable.
Bug Description
When a conversation accumulates many images (e.g., analyzing slide decks via DevTools screenshots), Claude Code hits a hardcoded 2000px dimension limit and crashes the session with:
This is catastrophic in long-running sessions. In our case, 8 hours of work analyzing 100+ presentation slides was effectively destroyed because:
/compact) destroys the conversation context — which is the entire point of the workExpected Behavior
Bkfunction) but it clearly fails in many-image scenariosimageMaxDimensionin settings.json)Reproduction
Environment
chrome-devtools-mcp@latest)Current Workaround
We patched
cli.jsdirectly — changingWB=2000,ZB=2000toWB=8000,ZB=8000. This works but gets overwritten on every update.Suggested Fix
A 1M context window AI that crashes over a 3000px image in 2026 is not acceptable.