[BUG] Image base64 size error persists

Resolved 💬 9 comments Opened Jan 21, 2026 by imagineerer Closed Apr 8, 2026

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:

  • /clear command
  • Restarting Claude Code completely
  • Clearing clipboard
  • Starting new sessions
  • /login to 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

  1. Start a Claude Code session
  2. Attach or send a large image (>5 MB) in a message
  3. Attempt to send subsequent text-only messages
  4. Error appears: "Image base64 size (5.4 MB) exceeds API limit (5.0 MB)"
  5. Try to clear the session with /clear command
  6. Send a new text-only message
  7. Error persists - the image is still being sent with every API call
  8. Exit and restart Claude Code completely
  9. Send a new message in the session
  10. 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_

View original on GitHub ↗

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