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"}]

View original on GitHub ↗

14 Comments

wyuenho · 1 year ago

I get this a lot in Claude Code as well, no idea what's happening cos clearly the prompt wasn't empty

pirate · 1 year ago

same, seeing this a ton on macOS

nick-myers-dt · 1 year ago

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"}
groeney · 1 year ago

I am also seeing this error -- happy to share context data if helpful.

davidpasztor · 10 months ago

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.

github-actions[bot] · 8 months ago

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.

notkearash · 8 months ago

bump for stopping the autoclose.

gengjiawen · 8 months ago

run into this more now

danneauxs · 8 months ago

constant. can't use at all. I am paying $20 a month just to read this message. Seems a bit steep.

zitongcharliedeng · 8 months ago

bump

GukDev · 7 months ago

Just got this after returning to a session after a few days since my usage limits were reached

vladtepes-gh · 7 months ago

constant too ...

github-actions[bot] · 6 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 5 months ago

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.