[BUG] Started to get API Error: 400

Resolved 💬 3 comments Opened May 3, 2026 by stemania1 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?

I suddenly started to get API errors in a Claude Code session

What Should Happen?

I should get a response instead of an API error

Error Messages/Logs

API Error
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.170.content.3.text: cache_control cannot be set for empty text blocks"},"request_id":"req_011CaegKdvxdjKUQ7xw4E6dT"}
hello

API Error
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"},"request_id":"req_011CaegLR3LuM65W8WXEhz59"}
hello

API Error
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"},"request_id":"req_011CaegRDK3DdYvSDu4ES3fC"}
hello

API Error
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"},"request_id":"req_011CaegcLXBeSMD4JYPQWbcL"}

Steps to Reproduce

I tell it "hello" and it gives me an API error.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

the latest Windows version

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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