ECONNRESET: socket hang up — page 2

The peer tore the TCP connection down mid-request.

251 issues · 46 open · 205 resolved (82%) · first seen May 14, 2025

First response · network

What to do now

Most likely: A DNS, proxy, TLS or socket layer interrupted the connection.

  1. Check whether the same request works without the current VPN or corporate proxy.
  2. Verify DNS and certificate trust without disabling TLS verification.
  3. 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. 93 new reports in the last 90 days vs 63 in the 90 before — +48%. The open backlog peaked at 70 in 2026-08 and sits at 46 today.

0 18 35 53 70 2025-052025-112026-052026-10
2025-05 — First reports2026-08 — Peak backlog (70 open)

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

175 of these reports name the Claude Code build they were running, spanning 108 releases. Heaviest reporters:

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 30 days across 205 closures. Of the 205 closures with a recorded reason, 16% were closed as completed and 172 as not-planned or duplicate. The most recent completed fix landed in 2026-10.

Workarounds reported by the community

58 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] 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] Connection-level errors (ECONNRESET, EPIPE, ETIMEDOUT) are never retried — immediate failure with zero recovery
…+ partial retry reimplementation is the core issue. Partial workaround: PostToolUseFailure hook to auto-retry You can't retry API calls from a hook, but you can detect connection-related failures and alert: Better workar…
Found in the thread of #37077 · resolved
[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

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 101–200

Ranked by community engagement (reactions weighted over comments).

Related aggregations

  1. ECONNREFUSED: connection refused

    214 issues
  2. Self-signed certificate in certificate chain

    43 issues
  3. ETIMEDOUT: request timed out

    33 issues
  4. getaddrinfo ENOTFOUND (DNS lookup failed)

    59 issues
  5. EADDRINUSE: address already in use

    31 issues
  6. API Error 400 (invalid_request_error)

    2,649 issues