[BUG] aAPI Error API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"},"request_id":"req_011CadzdJN5EMs3LtT7nCK6X"}

Resolved 💬 3 comments Opened May 2, 2026 by MPO2024 Closed May 6, 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?

when i paste a screenshot into chat it crashes teh session in claude code. its impossible to always remember to add a charachter into the chat to prevent this error.

<img width="923" height="723" alt="Image" src="https://github.com/user-attachments/assets/5d228238-da5e-43f7-8427-c676438fe85d" />

What Should Happen?

it should just let the screenshot go through

Error Messages/Logs

API Error
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.716.content.1.text: cache_control cannot be set for empty text blocks"},"request_id":"req_011CadzcQ9Z32r4LqUME6L7Z"}

Steps to Reproduce

paste a screenshot into chat with no text

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code 2.1.126.

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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