[BUG] API ERROR: 400
Resolved 💬 4 comments Opened Jan 28, 2026 by chashamm Closed Mar 1, 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 trying to code or doing a task this presented:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.99: all messages must have non-empty
content except for the optional final assistant message"},"request_id":"req_011CXZH3wa48pKjxxXSGSteg"}
What Should Happen?
Not that.
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.99: all messages must have non-empty
content except for the optional final assistant message"},"request_id":"req_011CXZH3wa48pKjxxXSGSteg"}
Steps to Reproduce
Write a prompt
Get the message
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.20
Claude Code Version
2.1.21
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗