ECONNRESET: socket hang up — page 3
The peer tore the TCP connection down mid-request.
229 issues · 70 open · 159 resolved (69%) · first seen May 14, 2025
First response · network
What to do now
Most likely: A DNS, proxy, TLS or socket layer interrupted the connection.
- Check whether the same request works without the current VPN or corporate proxy.
- Verify DNS and certificate trust without disabling TLS verification.
- Capture the hostname and exact socket code before escalating.
These are conservative triage steps, not an official Anthropic fix. Use the issue and workaround evidence below before making a destructive configuration change.
Is this getting better or worse?
This class of problem is still growing. 102 new reports in the last 90 days vs 78 in the 90 before — +31%. The open backlog peaked at 70 in 2026-08 and sits at 70 today.
Derived by counting each matching issue from its creation date until it closed. First-party
computation over the anthropics/claude-code tracker — the trend is not published
anywhere upstream.
Which builds report this
157 of these reports name the Claude Code build they were running, spanning 94 releases. Heaviest reporters:
- Claude Code v2.1.220
- Claude Code v2.1.222
- Claude Code v2.1.226
- Claude Code v2.1.234
- Claude Code v2.1.227
- Claude Code v2.1.177
- Claude Code v2.1.39
- Claude Code v2.1.218
Report volume, not a defect count: an issue can mention a build without that build having caused the failure. Versions come from the version string in the bug-report template, matched against real published tags.
Do these get fixed?
Median time to close is 29 days across 159 closures. Of the 159 closures with a recorded reason, 21% were closed as completed and 126 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
50 of these issues post a workaround someone says worked. The highest-engagement ones:
- Persistent ECONNRESET Errors on macOS Network Connections
- …n Bun. That's the same reason it "just works" through Warp. Workaround (Linux/macOS) Add to or : For a more reliable OS-level fix, build an LD PRELOAD shim that forces on every TCP socket: Also lower the TCP keepalive pr…
Found in the thread of #5674 · still open - [BUG] Bedrock Bearer Token (ABSK) authentication broken in v2.1.94
- …inary with identical environment variables works correctly. Workaround Pin to v2.1.92: shell AWS BEARER TOKEN BEDROCK CLAUDE CODE USE BEDROCK=1 AWS REGION claude /home/.../.local/share/claude/versions/2.1.92 -p "hello"`…
Found in the description of #44929 · resolved - [Bug] Anthropic API Error: ECONNRESET with exhausted retries in Claude desktop app
- …ries in the same file quote their paths and are unaffected. Workaround: quote the path in the hook command, or use forward slashes. Windows hook paths arguably should be quoted by the client.</p <h2 dir="ltr" class="mt-3…
Found in the description of #83994 · still open - [BUG] Intermittent ECONNRESET on both desktop app and standalone CLI, no VPN/proxy
- …ards kept working, so Private Relay was the sole cause. Two workarounds — either one is enough 1. Global: System Settings → Apple ID → iCloud → iCloud+ Features → Private Relay → off. 2. Per network (preferred): leave Pr…
Found in the thread of #87424 · still open - [BUG] ECONNRESET issues
- …fall-back to HTTP/1.1 viable? 3. A (or equivalent) env-var workaround so users on networks where Bun-h2 misbehaves can keep working while a fix lands. 4. A flag that turns on Bun fetch's (the error message itself recomm…
Found in the thread of #28557 · resolved
Excerpts are quoted from the linked issue so you can judge relevance before opening it. Threads that only ask for a workaround, or report that there is none, are excluded. These are community suggestions, not official guidance from Anthropic — read the full thread before applying one.
Matching issues 201–229
Ranked by community engagement (reactions weighted over comments).
- [Bug] Issue resolution not progressing or being addressed
- [BUG] This task didn't load properly
- Bug Report
- Invalid API Request: Empty Message Content Violation
- [BUG] ECONNRESET on all local sessions (CLI + desktop) while curl and undici reach the same hosts successfully — macOS arm64, v2.1.251
- API edge RSTs /v1/messages when time-to-first-header exceeds ~15s — large cold prompts (>~90K tokens) fail deterministically through all retries
- [Bug] ECONNRESET on streaming requests with bundled Node v26.3.0
- [BUG] After a Wi-Fi drop, ECONNRESET persists even once the network is back — only a full reboot recovers
- [BUG] Stream reset (ECONNRESET) 2-8ms after first chunk on every /v1/messages streaming request, while non-streaming and third-party SSE are healthy (Windows, v2.1.241)
- [BUG] Persistent ECONNRESET on home network (VDSL), works fine on mobile hotspot — macOS
- [Bug] Desktop app stalls indefinitely on large payloads while CLI completes same tasks normally
- [BUG] Desktop app: long streaming responses drop with ECONNRESET since v1.24012.11 auto-update
- [BUG] **Title**: Claude Code 2.1.233 intermittently stalls ~3 minutes before responding on Windows (client-side, zero network connections during stall)
- Frequent ECONNRESET disconnects on Windows 11
- [Bug] Subagents abort on connection errors instead of retrying (ECONNRESET)
- [BUG] Claude Code SSE stream repeatedly resets (ECONNRESET) on sustained connections only — local network/security software exhaustively ruled out
- Remote SSH: desktop app parks on "Reconnecting" for hours after a successful reconnect, and never retries
- [BUG] SSE stream to /v1/code/sessions/.../worker/events/stream closes immediately after connect — ECONNRESET banner, 2 machines / 2 networks
- Telegram channel plugin: poller gives up on 409 after ~28 s and never recovers, while /mcp still reports "connected"
- [BUG] Persistent "Unable to connect to API (ECONNRESET)" — survives network change, reinstall, and reboot (macOS, v2.1.212, Claude Pro)
- Resume fails with ECONNRESET when transcript is bloated by Chrome screenshots (each image stored twice in session .jsonl)
- [Bug] API Connection Error: ECONNRESET During Request Retries
- No in-product recovery when a session grows too large to send (/compact requires the failing round-trip)
- Failed requests fork a new conversation branch per retry, leaving dead tips in the transcript
- Nested background subagent: unresumed completion + stale idle_notifications + confident-wrong state claims turn a routine one-command deploy into a ~30-min ordeal (compounds #78782/#73647/#68922)
- Interactive-only 401 "OAuth access token has expired" with valid setup-token on Team org with channelsEnabled — print mode works; DISABLE_NONESSENTIAL_TRAFFIC fixes it
- [BUG] 返答スピードが遅い
- [BUG] Desktop SSH remote: client never sends publickey signature after "Postponed publickey" (regression in 1.21459.3; system OpenSSH with identical key/host works)
- [BUG] ECONNRESET — fresh sessions drop after a few turns; --resume fails to connect at all — v2.1.201, macOS