Bug Report all messages must have non-empty content except for the optional final assistant message
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"}]
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.
- Platform: MacOS 15.5 (24F74)
- Version: Claude Version 1.0.90
- Terminal: zsh 5.9 (arm64-apple-darwin24.0)
API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"messages.55: all messages must have non-empty content except for the optional final assistant message"},"request_id":"req_012CBWBhLqyec5MTmFgDnauE"}
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.