[BUG] Image attachment + text message causes messages: text content blocks must be non-empty 400 error
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?
sent a message with an image attachment + text, got messages: text content blocks must be non-empty repeatedly.
<img width="1482" height="1754" alt="Image" src="https://github.com/user-attachments/assets/d6277ce8-0821-4e1c-b691-215b012b23eb" />
What Should Happen?
It should respond or at least help me fix the issue. The chat is completely offline now.
Error Messages/Logs
Steps to Reproduce
Start a new conversation in Claude Code
Attach an image to a message
Add text to the same message
Send
Observe 400 error: messages: text content blocks must be non-empty
Subsequent messages in the same conversation continue to fail with the same error
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.123 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗