Preflight Checklist
What's Wrong?
When a conversation accumulates many images and one of them exceeds 2000px in any dimension, the API returns error 400 with message "image dimensions exceed max allowed size for many-image requests: 2000 pixels".
After this error occurs, every subsequent prompt returns the same error. The session becomes unrecoverable - you can still type and submit prompts, but they all fail with the same error message.
Error message:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.41.content.31.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels"}}
The only workaround is to start a new session with /clear or restart Claude Code entirely.
What Should Happen?
Claude Code should recover gracefully from this API error. Possible solutions:
- Detect and handle the error, then suggest
/compact or /clear to the user
-
- Auto-compact the conversation when this error is detected to remove older images
-
- Pre-validate image sizes when many images are present and warn before sending
-
- Remove problematic images from the context automatically when retrying
The session should remain usable after encountering this error.
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.41.content.31.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels"},"request_id":"req_011CWkfpvvzX7Y67QK6gPGji"}
Steps to Reproduce
- Start a Claude Code session
-
- Have a conversation that includes multiple screenshots/images (e.g., using browser automation tools that take screenshots)
-
- Continue the conversation until you accumulate many images in context
-
- Include or generate an image that exceeds 2000px in any dimension
-
- Submit a prompt - you will receive the API error
-
- Try to submit another prompt - the same error persists
-
- Every subsequent prompt fails with the same error until you
/clear or restart
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
No response

Preflight Checklist
What's Wrong?
When a conversation accumulates many images and one of them exceeds 2000px in any dimension, the API returns error 400 with message "image dimensions exceed max allowed size for many-image requests: 2000 pixels".
After this error occurs, every subsequent prompt returns the same error. The session becomes unrecoverable - you can still type and submit prompts, but they all fail with the same error message.
Error message:
The only workaround is to start a new session with
/clearor restart Claude Code entirely.What Should Happen?
Claude Code should recover gracefully from this API error. Possible solutions:
/compactor/clearto the userThe session should remain usable after encountering this error.
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.41.content.31.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels"},"request_id":"req_011CWkfpvvzX7Y67QK6gPGji"}Steps to Reproduce
/clearor restartClaude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
No response