Bug Report all messages must have non-empty content except for the optional final assistant message
Status Closed — not planned
Maintainer reply None cached
Activity 14 comments · opened Jul 17, 2025 · closed Mar 2, 2026
Bug Description
Environment Info
- Platform: linux
- Terminal: vscode
- Version: 1.0.53
- Feedback ID: 507f7995-4b4c-4975-ae1c-760aac7db5ab
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.0: all messages must have non-empty content except for the optional final assistant message\"}}\n at eQ.generate (file:///home/mman/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1180:6428)\n at k$.makeStatusError (file:///home/mman/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1197:2101)\n at k$.makeRequest (file:///home/mman/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1197:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-07-17T04:25:01.491Z"}]
14 Comments
I get this a lot in Claude Code as well, no idea what's happening cos clearly the prompt wasn't empty
same, seeing this a ton on macOS
I am repeatedly encountering this issue, and only ending the session and restarting (and losing the context) resolves it for a time.
API Error: 400
I am also seeing this error -- happy to share context data if helpful.
I'm also experiencing this and it's a really annoying bug as the only way to fix it is to restart claude, which means losing all context. Would be great to get this fixed.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
bump for stopping the autoclose.
run into this more now
constant. can't use at all. I am paying $20 a month just to read this message. Seems a bit steep.
bump
Just got this after returning to a session after a few days since my usage limits were reached
constant too ...
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.