Bug Report: API Error: request ended without sending any chunks
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"}]
Getting the same Error in WSL
Same in iTerm on MacOs with nodenv
that's api, not the code. looks like api is down.
Same here, with Termius on MacOS
me too https://github.com/anthropics/claude-code/issues/494
please check it, https://github.com/anthropics/claude-code/issues/502#issuecomment-2725893242
Fixed! Sorry about that
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.