[BUG] API Error: request ended without sending any chunks

Resolved 💬 19 comments Opened Mar 14, 2025 by Mike00000001 Closed Mar 14, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform:
  • Anthropic API
  • Claude CLI version: 0.2.42 (Claude Code)
  • Operating System: WSL Ubuntu

Bug Description

Claude Code has been working perfectly for days now, and I just started receiving this error from any prompt. Exiting and restarting does not fix. I can not currently use at all.

Error: API Error: request ended without sending any chunks

Steps to Reproduce

Enter any prompt into claude code

Expected Behavior

A response and action

Actual Behavior

API Error

Additional Context

!Image

View original on GitHub ↗

19 Comments

stevenlafl · 1 year ago

Same thing.. not sure why.

meligo · 1 year ago

have the same

Mike00000001 · 1 year ago

Nice to know I am in good company. 😁

BaseInfinity · 1 year ago

same happened to me after the update, time to open up Cline i guess lol

waleedkadous · 1 year ago

Having the same issue. Tried:

  1. Logging out, then logging in again.
  2. Uninstalling and reinstalling.
  3. Running in iterm instead of in vscode

None of these fixes worked approach worked.

│ - Environment info: macos, vscode, v0.2.42 │

timeless-residents · 1 year ago
daniyal0951 · 1 year ago

I forgot how to do work without Claude Code.... guess I take rest of day off?

Mike00000001 · 1 year ago
Having the same issue. Tried: 1. Logging out, then logging in again. 2. Uninstalling and reinstalling.

Same here. From the responses I assume Anthropics API is down.

stevenlafl · 1 year ago

Last version that works is:

npm install -g @anthropic-ai/claude-code@0.2.39

I get:

╭──────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview!       │
│                                                  │
│   /help for help                                 │
│                                                  │
│   cwd: /home/stevenlafl/Projects/project│
╰──────────────────────────────────────────────────╯

> hello

● Hello! How can I help you with the project today?
BaseInfinity · 1 year ago
Last version that works is: `` npm install -g @anthropic-ai/claude-code@0.2.39 ` I get: ` ╭──────────────────────────────────────────────────╮ │ ✻ Welcome to Claude Code research preview! │ │ │ │ /help for help │ │ │ │ cwd: /home/stevenlafl/Projects/project│ ╰──────────────────────────────────────────────────╯ > hello ● Hello! How can I help you with the project today? ``

Thanks! I reverted

daniyal0951 · 1 year ago
Last version that works is: `` npm install -g @anthropic-ai/claude-code@0.2.39 ` I get: ` ╭──────────────────────────────────────────────────╮ │ ✻ Welcome to Claude Code research preview! │ │ │ │ /help for help │ │ │ │ cwd: /home/stevenlafl/Projects/project│ ╰──────────────────────────────────────────────────╯ > hello ● Hello! How can I help you with the project today? ``

Nice I was just making my way down the versions (was at 0.2.40) lol

timeless-residents · 1 year ago
Last version that works is: `` npm install -g @anthropic-ai/claude-code@0.2.39 ` I get: ` ╭──────────────────────────────────────────────────╮ │ ✻ Welcome to Claude Code research preview! │ │ │ │ /help for help │ │ │ │ cwd: /home/stevenlafl/Projects/project│ ╰──────────────────────────────────────────────────╯ > hello ● Hello! How can I help you with the project today? ``

Wow, that totally works for me!

Mike00000001 · 1 year ago
Last version that works is: `` npm install -g @anthropic-ai/claude-code@0.2.39 ` I get: ` ╭──────────────────────────────────────────────────╮ │ ✻ Welcome to Claude Code research preview! │ │ │ │ /help for help │ │ │ │ cwd: /home/stevenlafl/Projects/project│ ╰──────────────────────────────────────────────────╯ > hello ● Hello! How can I help you with the project today? ``

Thank you very much!

vinay9986 · 1 year ago

I cannot even send a message now, hitting the enter after typing in a message does nothing

Mike00000001 · 1 year ago
I cannot even send a message now, hitting the enter after typing in a message does nothing

Downgrading got it working for me thanks to this tip:
npm install -g @anthropic-ai/claude-code@0.2.39

https://github.com/anthropics/claude-code/issues/502#issuecomment-2725885156

bcherny collaborator · 1 year ago

Fixed! Sorry about that

martin-rounds-ai · 1 year ago

@bcherny, there is regression in version 1.0.8.

jpwallace22 · 1 year ago

Im getting this is 1.0.9

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