Unprocessable image in context burns credits with no recovery path
Open 💬 3 comments Opened May 31, 2026 by pek2atx
Bug Description
When an image in the conversation cannot be processed, Claude Code surfaces this error:
API Error: an image in the conversation could not be processed and was removed. Re-read the file with a different approach if you still need it.
The image is not actually removed from the conversation context. Every subsequent message re-attempts processing the broken image, fails, and consumes credits. This continues until the user either manually runs /clear, starts a new conversation, or exhausts their usage credits.
Steps to Reproduce
- Send a screenshot or image file to Claude Code during a conversation
- If the image fails to process (corruption, format issue, etc.), the error above appears
- Continue sending messages in the same conversation
- Each message burns credits as the system re-attempts to process the broken image
Expected Behavior
- The broken image should be automatically removed from context so subsequent messages don't re-attempt processing it
- At minimum, the error message should tell the user to run
/clearor/compactto remove the broken image and stop credit consumption - The current error message ("Re-read the file with a different approach") gives no indication that every future message will keep burning credits
Actual Behavior
- The broken image stays in context
- Every subsequent message re-processes the full context (including the broken image), fails, and consumes credits
- The model, when asked about the error, advised "it'll go away on its own once those messages scroll out of context" — which is the worst possible advice since waiting means burning more credits
- Credits are consumed until the user hits their usage limit
Impact
This is a significant UX and billing issue. Users who don't know about /clear will burn through their entire credit allocation with no recovery path. The error message actively misleads users by implying the image was "removed" when it wasn't.
Suggested Fix
- Auto-remove: Strip the unprocessable image from context automatically so it doesn't get re-sent
- Clear guidance: If auto-removal isn't feasible, the error message should say: "Run
/clearto remove the broken image from this conversation and stop further credit usage" - Credit protection: Don't charge for API calls that fail due to unprocessable images in the context
Environment
- Claude Code (VS Code extension + CLI)
- macOS
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗