getaddrinfo ENOTFOUND (DNS lookup failed)

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

49 issues · 17 open · 32 resolved (65%) · 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. 23 new reports in the last 90 days vs 13 in the 90 before — +77%. The open backlog peaked at 17 in 2026-08 and sits at 17 today.

0 4 9 13 17 2025-082025-122026-042026-08
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

26 of these reports name the Claude Code build they were running, spanning 22 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 26 days across 32 closures. Of the 32 closures with a recorded reason, 16% were closed as completed and 27 as not-planned or duplicate. The most recent completed fix landed in 2026-08.

Workarounds reported by the community

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

[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 · still open
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 · still open
[BUG] Claude Code fails with ESERVFAIL on HPC systems with DNS infrastructure issues
Thanks for the detailed investigation and workaround. One possible improvement might be to make the installer more resilient when cannot be resolved but is still reachable. Instead of immediately failing with , the insta…
Found in the thread of #72706 · resolved
[Bug] Event-loop starvation causing ~200% CPU spin and input lag after hibernate/resume
…recent memory). - Restarting the stuck session was the only workaround needed, matching your report. Happy to share a fresh procdump capture next time this reproduces if it'd help triage.
Found in the thread of #80404 · 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 1–49

Ranked by community engagement (reactions weighted over comments).

Related aggregations

  1. ECONNRESET: socket hang up

    229 issues
  2. ECONNREFUSED: connection refused

    207 issues
  3. Self-signed certificate in certificate chain

    41 issues
  4. ETIMEDOUT: request timed out

    28 issues
  5. EADDRINUSE: address already in use

    30 issues
  6. API Error 400 (invalid_request_error)

    2,591 issues