[BUG] Failed screenshot attempts ("Image couldn't be processed") still consume tokens — causing runaway context/token waste
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
During a long adb/Android device testing session, Claude Code repeatedly called the screenshot tool (mcp__computer-use__screenshot) to verify emulator state. As the context grew large, the tool started returning "Image couldn't be processed" errors. Each failed attempt still consumed tokens. Claude retried multiple times, creating a loop that exhausted my usage limit without producing useful output. The session transcript shows dozens of failed image calls near the end of the session.
What Should Happen?
Failed image processing calls should not count toward token/context usage, OR the tool should automatically stop retrying after 2-3 consecutive failures and warn the user instead of silently burning tokens.
Error Messages/Logs
Tool response: "Image couldn't be processed"
(repeated multiple times in sequence as context window filled)
Session log: ~/.claude/projects/-Users-ergunefeturanli-code-word-search/088dd423-c0a3-4caf-a742-994514195d62.jsonl
Steps to Reproduce
- Start a long Claude Code session with computer-use/screenshot tools enabled
- Use screenshot tool repeatedly to verify Android emulator state
- As context grows large, screenshot calls begin returning "Image couldn't be processed"
- Observe that each failed call still consumes tokens
- Session hits usage limit due to failed call loop
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.159 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
<img width="995" height="846" alt="Image" src="https://github.com/user-attachments/assets/ef34f4f6-f464-4efd-af32-86a97956d19b" />