[BUG] Multiple image generation caused a media type mismatch error

Resolved 💬 3 comments Opened Dec 4, 2025 by naushera-lang Closed Dec 8, 2025

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?

  • Multiple image generation causes a media type mismatch error
  • Error persisted across all subsequent messages
  • Conversation became unusable and required restart
  • At times happened with just one image generation

Current Workaround

  • Start a new conversation when this happens
  • Generate images in smaller batches to reduce risk

Claude Code becomes unusable

What Should Happen?

Claude should technically be able to read the images that it's written and then either make edits or a user can have input suggestions, etc

Error Messages/Logs

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.9.content.36.image.source.base64.data: Image does not match the provided media type 
     image/png"},"request_id":"req_011CVmPtcWzzKuh2Q8dxookS"}

Steps to Reproduce

Not a coder so not sure how to help

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

v2.0.58

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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