[BUG] ECONNRESET errors - Unable to connect to API despite healthy network
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
- Open Claude Code (CLI or VS Code extension)
- Attempt any operation (even just viewing auth status)
- 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.
28 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I met the same issue...
Same issue still
Still an issue...
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
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.
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)
Same, very very frustrating and persistent lately!
Environment:
Symptoms:
curl -v https://api.anthropic.com/v1/messagessucceeds completely (TLS 1.3, HTTP/2, proper 405 response)Troubleshooting attempted (all unsuccessful):
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.
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.
The issue certainly hasn’t gone away for me, seems like something worth addressing and keeping open. Possibly on the
bunlevel.same issue here, I think i will cancel my subscription.
SAME issue sweet ai overlords.
Same...
same🙋
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.
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
Still randomly occurring to our team.. Help!
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.
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:
"ANTHROPIC_AUTH_TOKEN": "helloworld"line from~/.claude/settings.jsonThe ConnectionRefused error was actually the API rejecting requests due to authentication failure, not a network connectivity issue.
Just happened to me I had to restart my modem
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.)
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.
same issue
Pretty terrible first impression for a new user.
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 !
This is unusable
I noticed it Claude wouldn't work when I was under my company's vpn.
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.