[BUG] ECONNRESET errors - Unable to connect to API despite healthy network

Resolved 💬 28 comments Opened Dec 11, 2025 by dhawalshah Closed Jan 15, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Environment

  • Platform: Anthropic API (Claude Max)
  • Claude Code version: Latest (CLI and VS Code extension)
  • Operating System: macOS (MBP 2024)
  • Terminal: VS Code integrated terminal / native terminal
  • Model: Opus 4.5

Claude Code suddenly stopped working after functioning normally for several hours. The CLI and VS Code extension both fail with ECONNRESET errors when attempting to connect to the API.

✅ DNS resolution working (160.79.104.10)
✅ TCP connection successful on port 443
✅ TLS 1.3 handshake completed
✅ SSL certificate valid
✅ HTTP/2 working
✅ API responding (Cloudflare, cf-ray: 9ac3602f1d468958-SIN)

This confirms the issue is not with my local network, firewall, VPN, or DNS.
Steps to Reproduce

Open Claude Code (CLI or VS Code extension)
Attempt any operation (even just viewing auth status)
Connection fails with ECONNRESET after multiple retry attempts

What Should Happen?

Claude Code should connect to the API and function normally, as it did 2-3 hours prior.

Error Messages/Logs

**Primary error (CLI):**

> auth
└ Unable to connect to API (ECONNRESET)
  Retrying in 11 seconds… (attempt 6/10)

**Telemetry errors (VS Code extension output):**

2025-12-11 15:31:32.486 [info] From claude: 2025-12-11T07:31:32.486Z [ERROR] "Error: Error: {"message":"Failed to export 49 events","originalLine":"426","originalColumn":"34293","line":"426","column":"34293","sourceURL":"/$bunfs/root/claude","stack":"Error: Failed to export 49 events\n at doExport (/$bunfs/root/claude:426:34293)\n at processTicksAndRejections (native:7:39)"}"

2025-12-11 15:31:40.825 [info] From claude: 2025-12-11T07:31:40.824Z [ERROR] "Error: Error: 1P event logging: 6 events failed to export\n at queueFailedEvents (/$bunfs/root/claude:426:35104)\n at doExport (/$bunfs/root/claude:426:34215)\n at processTicksAndRejections (native:7:39)"

**Network Diagnostics**
I verified that network connectivity to api.anthropic.com is healthy:
`bash$ curl -v https://api.anthropic.com/v1/messages`
**Result:** Connection successful (HTTP/2 405 - expected for GET request)

Steps to Reproduce

  1. Open Claude Code (CLI or VS Code extension)
  2. Attempt any operation (even just viewing auth status)
  3. Connection fails with ECONNRESET after multiple retry attempts

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.65

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Troubleshooting Already Attempted

  • Restarted VS Code
  • Logged out and logged back in (claude auth logout / claude auth login)
  • Reinstalled Claude Code CLI
  • Verified network connectivity with curl
  • Confirmed not hitting rate limits (on Max plan)
  • Checked official status page (shows operational)

Additional Context

Third-party status monitors (IncidentHub, StatusGator) show Claude Code as "Affected" with 45+ user reports in the past 24 hours, despite the official status page showing operational.
The issue appears to affect Claude Code's persistent/streaming connections specifically, while simple HTTP requests succeed.
This suggests a server-side issue with the connection handling for Claude Code clients that hasn't been acknowledged on the official status page yet.

Request
Could the team please investigate? It appears this may be affecting multiple users based on third-party monitoring data.

View original on GitHub ↗

28 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5674
  2. https://github.com/anthropics/claude-code/issues/8030
  3. https://github.com/anthropics/claude-code/issues/3131

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

huangsen365 · 7 months ago

I met the same issue...

hn-alchemist · 6 months ago

Same issue still

tickcode · 6 months ago

Still an issue...

dacort · 6 months ago

I had a similar issue I was able to fix by tweaking my wifi MTU setting, details here: https://github.com/anthropics/claude-code/issues/5674#issuecomment-3698209976

brianlellis · 6 months ago

Same issue, they auto close a lot of bugs.

https://github.com/anthropics/claude-code/issues/653

But yeah, I just cancelled my subscription. It's been a week of trying to get it to work.

Khetnen · 6 months ago

This might be the same thing: I am getting ECONNRESET errors only on my main (long) conversation, even after exiting/resuming and compacting. (I'm on Windows)

brigleb · 6 months ago

Same, very very frustrating and persistent lately!

Environment:

  • macOS 26.2 (Tahoe)
  • Claude Code 2.1.7
  • CenturyLink Greenwave C4000XG modem/router (PPPoE connection)
  • Asus router functioning as access point/switch (not routing—all traffic goes directly through CenturyLink modem)

Symptoms:

  • Claude Code fails immediately on launch with Unable to connect to API (ECONNRESET), retries 10x then fails
  • Claude.ai in Safari works perfectly on the same network
  • curl -v https://api.anthropic.com/v1/messages succeeds completely (TLS 1.3, HTTP/2, proper 405 response)

Troubleshooting attempted (all unsuccessful):

  • Changed DNS to Google (8.8.8.8) at both router and Mac level
  • Disabled SIP ALG, IPv4 Firewall on modem
  • Flushed DNS cache
  • Verified no VPN, no MDM profiles, no proxy env vars
  • Disabled private Wi-Fi address

Key finding:

Tethering through iPhone (even while phone is on the same home Wi-Fi) makes Claude Code work perfectly. This suggests the CenturyLink modem is doing something to Mac→API connections that the phone's network stack handles differently.

dhawalshah · 6 months ago

so in my case, I discovered the issue was with the WiFi network I was on. I switched on VPN and the issue disappeared. The only concerning part is I don't know what changed from one day to the next to cause the issue.

brigleb · 6 months ago

The issue certainly hasn’t gone away for me, seems like something worth addressing and keeping open. Possibly on the bun level.

justin-eckenweber · 6 months ago

same issue here, I think i will cancel my subscription.

jeremiahjoven · 5 months ago

SAME issue sweet ai overlords.

kevyourdev · 5 months ago

Same...

TimeFlysLeo · 5 months ago

same🙋

rodyarantes · 5 months ago

Same issue here. It does it's thing until it blocks and starts doing this. Sometimes CTRL+C + UP + ENTER to begin again continues, most times it just goes back in to the same ECONNRESET. These are increasing back off periods and at 10 a couple of minutes. Often if it gets stuck past 5 I kill it and restart.

It I give it a couple of minutes, it usually works again.

⎿  Unable to connect to API (ECONNRESET)                                                                                                                                                                                      
     Retrying in 6 seconds… (attempt 7/10)                                                                                                                                                                                      ```
abubytes · 5 months ago

SAME HERE on MacOS
I thought it was Tailscale or Adguard, uninstalled both, still getting the error randomly
restarting the mac is the only way to solve this, then out of nowhere it stops working

andreafalzetti · 5 months ago

Still randomly occurring to our team.. Help!

jeremiahjoven · 5 months ago

I was able to resolve this issue by trying to use other WiFi - it seems to be a router blocking issue.

Starlink works without issue.
TPLink routers (same IP as broken one)
Asus Router = Econn Reset issue.

Adenhall · 5 months ago

In my case, I think I got some other AI changed my token. Re-logging does not fix this but I managed to find out why
Here was the analysis and how I fixed it. Root cause was stupid but that was probably just me. I hope this helps someone

Problem: Claude Code v2.1.7 showed "Unable to connect to API (ConnectionRefused)" when trying to chat, even though login worked.

Root Cause: Invalid API key ("helloworld") stored in Claude Code's settings file at ~/.claude/settings.json.

How I Fixed It:

  1. Identified the bad API key in the settings file
  2. Removed the invalid "ANTHROPIC_AUTH_TOKEN": "helloworld" line from ~/.claude/settings.json
  3. You'll need to run claude login to set a valid API key

The ConnectionRefused error was actually the API rejecting requests due to authentication failure, not a network connectivity issue.

MajorWookie · 5 months ago

Just happened to me I had to restart my modem

brigleb · 5 months ago

I will say that I’ve consistently got Claude Code working if I manually set the MTU of the network interface on my mac to 1460. Crazy, I know. It defaults to 1500 but for some reason, some combination of factors I haven’t been able to track down causes problems. If you’re still having a problem here, try the MTU. (Sadly, this did not fix Claude Cowork for me, which has never once yet worked in our home network.)

b-rat · 5 months ago

I was having this issue, but only at my house. Changed wifi routers within my home and the issue was still present.

I found guidance on both Google and through Claude to change the MTU of my computer to 1492 from 1500. The rationalization from Claude was on older internet connections (DSL, for instance), max packet size is 1500, but PPPoE (Point-to-Point Protocol over Ethernet) adds 8 bytes to the 1500 making the packet 1508. This >1500 size gets broken up and causes dropped packets somewhere between my computer and the Anthropic server.

sudo networksetup -setMTU Wi-Fi 1492

Above command was suggested by Claude to permanently adjust the setting on my computer. This worked for me and Claude Code works as normal on my home network.

GuyAdou · 5 months ago

same issue

Novak3 · 5 months ago

Pretty terrible first impression for a new user.

dejanstrancar · 5 months ago

https://github.com/anthropics/claude-code/issues/13657#issuecomment-3814744324 this resolved also my problem. Claude worked over company VPN but not without. Reducing MTU to 1492 resolved the issue.
TY @b-rat !

BeatyThomas · 5 months ago

This is unusable

saxxi · 5 months ago

I noticed it Claude wouldn't work when I was under my company's vpn.

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