Image dimension error blocks ALL responses instead of gracefully degrading
Bug Description
When a conversation contains an image exceeding 2000px dimension limit (for multi-image requests), every subsequent response becomes the same error message, making the session completely unusable:
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.
The user cannot interact with Claude at all — every input, regardless of content, returns the same error. The session is effectively bricked until the user manually runs /compact or /clear.
Steps to Reproduce
- In a Claude Code CLI session, read/view a large image (>2000px)
- Continue the conversation until more images or content accumulates
- At some point, every response becomes the dimension limit error
- User input is completely ignored — even simple text like "hello" returns the same error
Expected Behavior
- Auto-resize images exceeding the dimension limit before sending to the API
- Or: skip/remove the oversized image and continue the conversation normally
- Or: at minimum, the error should only affect the specific API call, not permanently brick the session — subsequent messages without image references should work normally
Actual Behavior
The error blocks ALL API calls for the entire session. The user is trapped in a loop where no input produces any useful response. /compact works as a workaround but the user has to know to try it — and if /compact itself triggers the same API path, it may also fail.
Environment
- Claude Code version: 2.1.96
- OS: macOS (Darwin 24.6.0)
- Installation: native binary
Suggested Fix
Before sending the conversation to the API, pre-process images to:
- Detect images exceeding the multi-image dimension limit
- Either auto-downscale them to fit within limits, or
- Remove them from the context with a notice, rather than failing the entire request
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗