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.
- 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. 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.
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:
- Claude Code v2.1.217
- Claude Code v2.1.212
- Claude Code v2.1.193
- Claude Code v2.1.78
- Claude Code v2.1.246
- Claude Code v2.1.237
- Claude Code v2.1.238
- Claude Code v2.1.233
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).
- [BUG] Connection-level errors (ECONNRESET, EPIPE, ETIMEDOUT) are never retried — immediate failure with zero recovery
- [BUG] Claude Code 2.1.193 on Linux: getaddrinfo EREFUSED on all Anthropic domains
- [BUG] VS Code extension login prompt not bypassed with claudeCode.disableLoginPrompt: true when using Microsoft Foundry
- [BUG] Claude Code (Bun runtime) fails with getaddrinfo ETIMEOUT when /etc/resolv.conf has trailing inline comments on nameserver lines
- [BUG]
- Remote control: sessions die permanently on session-limit hit and on transient disconnects; mobile app still shows them alive and silently drops messages
- sandbox.network.allowedDomains does not work for Node.js processes (DNS resolution blocked)
- [Bug] Auto-Compact causes context loss and degraded performance
- Login failed: getaddrinfo ENOTFOUND alb-cache - OAuth callback exposes internal hostname
- claude update fails with "getaddrinfo EREFUSED" on split-DNS VPN — updater resolves via c-ares, not the system resolver
- [BUG] Claude Code intermittent crashes on Linux with IVPN — DNS resolution, MCP auth spam, and server-side instability
- [Bug] Repository skills not displaying during active session
- [BUG] Claude Code fails with ESERVFAIL on HPC systems with DNS infrastructure issues
- [Bug] Event-loop starvation causing ~200% CPU spin and input lag after hibernate/resume
- Fleet/agents view fails OAuth login with getaddrinfo ENOTFOUND platform.claude.com, doesn't reuse existing terminal credentials
- [BUG] installer dns resolution fails due to hardcoded dns server
- [Bug] Claude Code fails to read project documentation and provides misleading information about system access
- [Feature Request] User appreciation feedback
- [BUG] Desktop: cannot switch between Home and Code tabs, one is always disabled. Browser works fine on same account
- Bash sandbox blocks Go binaries' DNS resolution for hosts already on `allowedHosts`
- Cowork Desktop: "Allow network egress" additional-domain entries not enforced when mode is "Package managers only" (DNS EAI_AGAIN; wildcard matching inconsistent)
- [Bug] Excessive token consumption for simple queries - 74.8k tokens used with 5 tool calls
- Telegram plugin: polling exits permanently on network errors during long sessions
- [BUG] Cowork scheduled task: domain api.asaas.com blocked by egress proxy (was working previously)
- excludedCommands: ["git"] does not fully bypass sandbox — SSH subprocess network access blocked
- [Bug] Bug Report: Unable to process empty input
- [Feature Request] Document Pro tier model availability and limitations
- [Feature Request] Document Pro tier model availability and limitations
- [BUG] Node.js DNS resolution fails for googleapis.com (EAI_AGAIN error)
- [Bug] File fuzzy matcher incomplete suggestions for nested directories with @ prefix
- [Bug] Anthropic API Error: Missing Tool Result Block
- [BUG] Can't run, uninstall or run claude
- [BUG] macOS: silently-denied Local Network permission permanently breaks all daemon-spawned sessions (ENOTFOUND); attaching to a fleet session poisons every session in the terminal
- [Bug] Claude Code ignores provided documentation and generates incorrect information
- [BUG] VS Code extension login prompt not bypassed with claudeCode.disableLoginPrompt: true when using Microsoft Foundry
- [Bug] Model performance degradation: hallucinations and off-task behavior after heavy token usage
- [BUG] macOS bg sessions inherit XPC_FLAGS=0x2 from daemon, breaking getaddrinfo DNS (curl/git "Could not resolve host") for all Bash tool commands
- [BUG] macOS DarkWake: transient DNS failure during OAuth refresh loses login
- [BUG] Claude Code on the web (cloud/remote sessions) can read but not push to my GitHub repo
- [BUG] Agent teams: teammate sessions die with ConnectionRefused (Bun tries IPv6, no IPv4 fallback) while the lead keeps working
- [BUG] Remote SSH sessions ignore ~/.ssh/config host aliases — Node getaddrinfo runs before invoking ssh
- No supported configuration path for DNS: settings.json `env` is applied after Bun runtime init
- [BUG] Desktop SSH connections fail when ~/.ssh is an iCloud Drive symlink — spawned ssh/ssh-keygen can't read known_hosts or config
- [BUG] macOS: hostnames from /etc/hosts and /etc/resolver/* fail with getaddrinfo ENOTFOUND while a VPN's DNS is active, breaking local HTTP MCP servers
- [BUG] Claude Desktop Code tab SSH connection fails with "All configured authentication methods failed" — offers zero keys to server (Windows)
- macOS background jobs detached from Aqua login-session bootstrap → DNS/TLS break after VPN reconnect
- [BUG] Claude Desktop 3P (Bedrock SSO): credential resolver ignores HTTPS_PROXY — DNS fails on restricted networks
- [FEATURE] retrieve the search index's cached/extracted copy of a page
- Claude Code (macOS) cannot resolve .local MCP/marketplace hostnames — bundled resolver short-circuits .local before any DNS lookup