ThinkFacility

Error messages

API Error: Connection dropped (ECONNRESET)

The message

API Error: Connection dropped (ECONNRESET)
Claude Code 2.1.280 read September 23, 2026Claude CodenetworkECONNRESET

What it means

The connection to Anthropic's API was cut after it opened. Claude Code already retried it several times before showing you this, so the drop kept happening.

What to do

Run curl -I https://api.anthropic.com from the same shell, then check for a proxy, VPN or container runtime in the path. If it only fails on one network, try another one.

Claude Code shows this when a connection to Anthropic's API opened and then got cut. Mid-request, the other end (or something between you and it) reset the socket. It's had a busy September. On September 22 alone, two new GitHub reports landed in anthropics/claude-code, one from VS Code on macOS and one from Windows 11 on version 2.1.280:

API Error: Connection dropped (ECONNRESET)

We read how the message is built in the 2.1.280 binary, and what the official error reference says about it.

Where the old “Connection error.” went

If you've used Claude Code for a while you'll know the older wording, API Error: Connection error.. It's the default message from Anthropic's SDK and it told you nothing. 223 issues in the repo quote it. The changelog for 2.1.33 says Claude Code started naming the cause, and 2.1.280 does it by looking at the socket's error code:

Refused connections, DNS failures and missing routes get their own wording. The error reference adds that before v2.1.227 every one of these read Unable to connect to API and a code, so Unable to connect to API (ECONNRESET) is the same failure on an older version.

You only see it after the retries ran out

Claude Code retries connection failures by itself, 10 times by default (the CLAUDE_CODE_MAX_RETRIES setting). While it does, the spinner shows the attempt count, which is what a July 2025 report on Windows pasted over and over: API Error (Connection error.) · Retrying in 1 seconds… (attempt 1/10). So by the time the message reaches your conversation, the drop has repeated through every attempt. Raising the count didn't help the September 22 Windows reporter, who had already tried 25.

What the error reference says to check

Start with curl -I https://api.anthropic.com in the same shell. On Windows PowerShell type curl.exe so you don't get the built-in alias. If you're behind a corporate proxy, set HTTPS_PROXY before starting Claude Code, and if you use a gateway, point ANTHROPIC_BASE_URL at it.

When curl works and Claude Code still fails, Anthropic's page points at the layer in between: an unreachable nameserver in /etc/resolv.conf on Linux and WSL, a leftover utun interface from an uninstalled VPN on macOS, or Docker Desktop intercepting traffic. Quitting Docker Desktop and retrying is the cheapest of those to rule out.

When a VPN makes it go away

The most careful report we found came from someone on Movistar in Spain on 2.1.270. Their connections were reset only when the TLS handshake offered a post-quantum key share (X25519MLKEM768), which makes the first packet big enough to split in two. Classical handshakes went through 12 times out of 12, and so did everything through a VPN. By their account, Claude Code's client always offers that key share and has no setting to turn it off. Routing it through a local proxy that drops the share, set with ANTHROPIC_BASE_URL, fixed it. Commenters in Germany and Hungary reported the same symptom, and the one in Germany said a VPN fixed it there too.

We didn't expect a network path in one country to be the whole story, but the pattern (fine on one network, broken on another, fixed by a VPN) is what separates this case from a real outage.

When only one model drops

The Windows report from September 22 is stranger. One project pinned to claude-fable-5-1 failed almost every session, other projects were fine, and the same project stopped failing when it switched to the max setting. The reporter noted that Anthropic's status page listed elevated errors for Fable 5 and 5.1 that day. If your drops follow one model, check status.claude.com and try /model before you take your network apart. No one from Anthropic had replied on either September 22 issue when we read them.

If the API answers but is out of capacity, that's a different message: see Repeated 529 Overloaded errors.

Other lines the same feature prints

Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.

  • API Error: Connection error.
  • API Error (Connection error.) · Retrying in 1 seconds… (attempt 1/10)
  • TypeError (fetch failed)
  • API Error: Unable to connect to API. Check your internet connection
  • API Error: Unable to connect to API (ECONNRESET)
  • Connection dropped (EPIPE)