[BUG] Image base64 size error persists
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?
Issue: Image base64 size error persists across all sessions despite the image size being under limit
Description:
Claude Code repeatedly shows this error with every message:
"Image base64 size (5.4 MB) exceeds API limit (5.0 MB). Please resize the image before sending."
What I've tried:
/clearcommand- Restarting Claude Code completely
- Clearing clipboard
- Starting new sessions
/loginto re-authenticate
System info:
- Platform: macOS (Darwin 23.6.0)
- Terminal/IDE: Antigravity
- The error persists even with new prompts
The image appears to be stuck in the session state and is sent with every API call.
What Should Happen?
Claude Code should not automatically include any images in the conversation context unless explicitly provided by the user in the current message. The session should start fresh after using /clear or restarting Claude Code, without carrying over large image data from previous interactions.
Expected behavior:
- No error messages about image size limits when sending text-only prompts
- /clear command should completely reset the conversation state
- Restarting Claude Code should start with a clean session
- Only images explicitly attached by the user should be included in API calls
Error Messages/Logs
Steps to Reproduce
- Start a Claude Code session
- Attach or send a large image (>5 MB) in a message
- Attempt to send subsequent text-only messages
- Error appears: "Image base64 size (5.4 MB) exceeds API limit (5.0 MB)"
- Try to clear the session with /clear command
- Send a new text-only message
- Error persists - the image is still being sent with every API call
- Exit and restart Claude Code completely
- Send a new message in the session
- Error still persists in the same session - the image remains in the session context
The image appears to be permanently cached/stored and included with all subsequent messages, even after clearing the conversation or restarting Claude Code entirely.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.14 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗