Bug Report: API Error: request ended without sending any chunks

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 8 comments · opened Mar 14, 2025 · closed Mar 14, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Bug Description

Environment Info

  • Platform: macos
  • Terminal: vscode
  • Version: 0.2.42
  • Feedback ID: bd066129-31a2-4e98-b985-9d1ac417a9d3

Errors

[{"error":"Error: request ended without sending any chunks\n    at Xu.I (file:///Users/studio/.nvm/versions/node/v22.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:514:27940)\n    at Xu._createMessage (file:///Users/studio/.nvm/versions/node/v22.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:514:24087)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-03-14T21:58:21.140Z"},{"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 _5.generate (file:///Users/studio/.nvm/versions/node/v22.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:510:12916)\n    at H5.makeStatusError (file:///Users/studio/.nvm/versions/node/v22.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:514:7207)\n    at H5.makeRequest (file:///Users/studio/.nvm/versions/node/v22.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:514:8150)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-03-14T21:58:28.725Z"}]

View original on GitHub ↗

8 Comments

SNRSE · 1 year ago

Getting the same Error in WSL

Jflick58 · 1 year ago

Same in iTerm on MacOs with nodenv

depyronick · 1 year ago

that's api, not the code. looks like api is down.

timyal · 1 year ago

Same here, with Termius on MacOS

timeless-residents · 1 year ago
timeless-residents · 1 year ago
bcherny collaborator · 1 year ago

Fixed! Sorry about that

github-actions[bot] · 1 year 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.