[BUG] 4xx error when using LLM

Resolved 💬 2 comments Opened Jun 17, 2025 by jeffrey-l-turner Closed Jun 18, 2025

Environment

  • Platform (select one):
  • [ x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.25 (Claude Code)
  • Operating System: macOS 15.5
  • Terminal: iTerm2 & Warp

Bug Description

After using /login in claude code and succesfully authenticating, I get:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.0.content.5.text: cache_control cannot be set for empty text blocks"}}
This occurs whether I'm attempting to use my max plan or pay per use API.

Steps to Reproduce

  1. Start claude code from command line
  2. run /login
  3. perform any command using LLM and notice error

Expected Behavior

Expect it to work as before. I'm seeing similar complaints on Reddit and no one know why it is randomly occured

Actual Behavior

<!-- What actually happened -->

Additional Context

If there is a problem with rate limiting or out of use, a clear error or warning should be reported

View original on GitHub ↗

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