claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

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

Open timeless-residents opened this issue 1 year ago • 8 comments

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

timeless-residents avatar Mar 14 '25 21:03 timeless-residents

Getting the same Error in WSL

SNRSE avatar Mar 14 '25 22:03 SNRSE

Same in iTerm on MacOs with nodenv

Jflick58 avatar Mar 14 '25 22:03 Jflick58

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

depyronick avatar Mar 14 '25 22:03 depyronick

Same here, with Termius on MacOS

timyal avatar Mar 14 '25 22:03 timyal

me too https://github.com/anthropics/claude-code/issues/494

timeless-residents avatar Mar 14 '25 22:03 timeless-residents

please check it, https://github.com/anthropics/claude-code/issues/502#issuecomment-2725893242

timeless-residents avatar Mar 14 '25 22:03 timeless-residents

Fixed! Sorry about that

bcherny avatar Mar 14 '25 22:03 bcherny

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.

github-actions[bot] avatar Aug 09 '25 14:08 github-actions[bot]