Intermittent/recurring ECONNRESET on api.anthropic.com — network verified healthy throughout (Windows, CLI 2.1.100 and extension 2.1.220)

Status Open
Reported on v2.1.100
Maintainer reply None cached
Activity 1 comment · opened Jul 28, 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:

OS: Windows 11
Claude Code CLI: 2.1.100 (also reproduces on 2.1.220 native binary in VS Code extension)
VS Code extension: anthropic.claude-code 2.1.220
Wi-Fi: MediaTek Wi-Fi 6E MT7922, 5GHz, 84% signal, -57 RSSI, 802.11ax, no packet loss
Router/modem: Netgear Nighthawk CAX80

What's happening:
Claude Code repeatedly fails with API Error: Unable to connect to API (ECONNRESET), retrying through the full 10-11 attempts and sometimes exhausting them entirely (hard failure), other times recovering partway through. This happens on both simple prompts and longer operations like /doctor.

Ruled out (with evidence):

Continuous ping -t 8.8.8.8 during an active ECONNRESET retry cycle showed zero packet loss, stable 35-50ms latency throughout
curl -I https://api.anthropic.com succeeds instantly (200/404, TLS handshake fine)
Windows Defender real-time protection disabled — no change
Router SIP ALG disabled — no change
Router SPI/IPv4 firewall disabled — no change
MTU lowered to 1400 — no change
Router power-cycled — no change
IPv4-first DNS resolution forced via NODE_OPTIONS — no change
Wi-Fi adapter power management disabled — no change
No VPN, no corporate proxy, no third-party AV
Reproduces on both CLI 2.1.100 and extension's bundled native binary 2.1.220
OneDrive-synced working directory ruled out (moved project to non-synced path)

Debug log excerpt (from ~/.claude/debug/):

[DEBUG] Stream started - received first chunk
[DEBUG] [API:timing] first byte after 2292ms
...
[ERROR] Connection error details: code=ECONNRESET, message=The socket connection was closed unexpectedly.
[ERROR] API error x-client-request-id=60fc6c23-3cc0-4d63-9098-9371d9bd3d09

What Should Happen?

Claude should connect to the API correctly without having timeout issues.

Error Messages/Logs

Steps to Reproduce

Ruled out (with evidence):

Continuous ping -t 8.8.8.8 during an active ECONNRESET retry cycle showed zero packet loss, stable 35-50ms latency throughout
curl -I https://api.anthropic.com succeeds instantly (200/404, TLS handshake fine)
Windows Defender real-time protection disabled — no change
Router SIP ALG disabled — no change
Router SPI/IPv4 firewall disabled — no change
MTU lowered to 1400 — no change
Router power-cycled — no change
IPv4-first DNS resolution forced via NODE_OPTIONS — no change
Wi-Fi adapter power management disabled — no change
No VPN, no corporate proxy, no third-party AV
Reproduces on both CLI 2.1.100 and extension's bundled native binary 2.1.220
OneDrive-synced working directory ruled out (moved project to non-synced path)

Debug log excerpt (from ~/.claude/debug/):

[DEBUG] Stream started - received first chunk
[DEBUG] [API:timing] first byte after 2292ms
...
[ERROR] Connection error details: code=ECONNRESET, message=The socket connection was closed unexpectedly.
[ERROR] API error x-client-request-id=60fc6c23-3cc0-4d63-9098-9371d9bd3d09

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.100

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗