Read tool sends oversized images to API, then re-sends them on every subsequent message

Resolved 💬 9 comments Opened Apr 1, 2026 by RichardLindhout Closed May 26, 2026

Bug Description

When Claude Code reads image files that are too large for the API to process, it gets a 400 Could not process image error. However, instead of dropping those images from context or warning the user, it keeps re-sending the same unprocessable images on every subsequent message, causing the same error repeatedly.

This makes the conversation completely stuck — every new user message triggers the same API error because the oversized images are still in context.

Steps to Reproduce

  1. Have Claude Code read multiple large image files (e.g., high-res product photos)
  2. The API returns: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"}}
  3. Send any follow-up message
  4. The same error occurs again because the images are still being sent

Expected Behavior

  • Claude Code should resize/downsample images before sending them to the API, OR
  • If an image fails to process, it should be dropped from context with a warning instead of being re-sent on every subsequent message, OR
  • Claude Code should pre-validate image dimensions/size and warn the user before attempting to send

Actual Behavior

The "Could not process image" error repeats on every subsequent message, making the conversation unusable until the user starts a new session.

Environment

  • Claude Code CLI
  • Model: Opus (1M context)
  • Reading local image files via the Read tool

Transcript

⏺ [Claude reads 8 image files]
  ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"}}

❯ [user sends follow-up]
  ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"}}

❯ [user sends another message]  
  ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"}}

❯ [user asks to resize]
  ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"}}

Every subsequent message triggers the same error — the conversation is completely stuck.

View original on GitHub ↗

This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗