getaddrinfo ENOTFOUND (DNS lookup failed)

The hostname failed to resolve, usually DNS or a proxy rewrite.

59 issues · 11 open · 48 resolved (81%) · first seen Aug 8, 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. 25 new reports in the last 90 days vs 12 in the 90 before — +108%. The open backlog peaked at 17 in 2026-08 and sits at 11 today.

0 4 9 13 17 2025-082026-012026-062026-10
2025-08 — First reports2026-07 — Most new reports (14)2026-08 — Peak backlog (17 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

35 of these reports name the Claude Code build they were running, spanning 29 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 48 closures. Of the 48 closures with a recorded reason, 21% were closed as completed and 38 as not-planned or duplicate. The most recent completed fix landed in 2026-09.

Workarounds reported by the community

25 of these issues post a workaround someone says worked. The highest-engagement ones:

[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] Claude Code (Bun runtime) fails with getaddrinfo ETIMEOUT when /etc/resolv.conf has trailing inline comments on nameserver lines
…fixed on the client/cluster side without an ongoing manual workaround. What Should Happen? Claude Code's DNS resolution should tolerate trailing comments in , consistent with parsing behavior in glibc and virtually ever…
Found in the description of #78529 · resolved
[BUG] v2.1.257 aborts at launch on macOS 12 (dyld: _DNSServiceGetAddrInfoEx) — auto-updater installs it and leaves the install unable to start
…behavior on macOS 11 back in April. Both went stale-closed. Workaround for anyone stuck on macOS 12: then add to the block of , otherwise the next background update quietly reinstalls the broken build. You lose Fable 5.1…
Found in the description of #91309 · resolved
sandbox.network.allowedDomains does not work for Node.js processes (DNS resolution blocked)
…ses, even when the command name matches. - The only working workaround is setting on every Bash invocation that runs a Node.js-based tool. Suggestions 1. Fix for all resolver implementations : Ensure the sandbox DNS filt…
Found in the description of #37782 · resolved
claude update fails with "getaddrinfo EREFUSED" on split-DNS VPN — updater resolves via c-ares, not the system resolver
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) -
Found in the description of #71699 · 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 1–59

Ranked by community engagement (reactions weighted over comments).

Related aggregations

  1. ECONNRESET: socket hang up

    251 issues
  2. ECONNREFUSED: connection refused

    214 issues
  3. Self-signed certificate in certificate chain

    43 issues
  4. ETIMEDOUT: request timed out

    33 issues
  5. EADDRINUSE: address already in use

    31 issues
  6. API Error 400 (invalid_request_error)

    2,649 issues