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.
- 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. 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.
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:
- Claude Code v2.1.258
- Claude Code v2.1.224
- Claude Code v2.1.217
- Claude Code v2.1.212
- Claude Code v2.1.193
- Claude Code v2.1.78
- Claude Code v2.1.296
- Claude Code v2.1.286
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).
- [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
- Remote control: sessions die permanently on session-limit hit and on transient disconnects; mobile app still shows them alive and silently drops messages
- [BUG]
- [BUG] v2.1.257 aborts at launch on macOS 12 (dyld: _DNSServiceGetAddrInfoEx) — auto-updater installs it and leaves the install unable to start
- sandbox.network.allowedDomains does not work for Node.js processes (DNS resolution blocked)
- [Bug] Auto-Compact causes context loss and degraded performance
- claude update fails with "getaddrinfo EREFUSED" on split-DNS VPN — updater resolves via c-ares, not the system resolver
- Login failed: getaddrinfo ENOTFOUND alb-cache - OAuth callback exposes internal hostname
- [BUG] Claude Code fails with ESERVFAIL on HPC systems with DNS infrastructure issues
- [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] 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 process exited with code 134
- [BUG] Desktop: cannot switch between Home and Code tabs, one is always disabled. Browser works fine on same account
- [Bug] Claude Code fails to read project documentation and provides misleading information about system access
- [Feature Request] User appreciation feedback
- [BUG] Desktop app's bundled Claude Code crashes on macOS 12 (dyld: _DNSServiceGetAddrInfoEx) while the standalone CLI runs fine
- 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]Gmail / Google Calendar / Google Drive MCP connectors unreachable (NXDOMAIN)
- [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] 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] 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
- [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] Claude Code install/launch hangs indefinitely on Hyper-V VM with Processor Compatibility Mode enabled
- [BUG] Claude Code hangs with zero output on Ubuntu VM under Proxmox (all commands except --version)
- [BUG] dyld Symbol not found (_DNSServiceGetAddrInfoEx) crash on macOS 12.7.6 — claude-code 2.1.255
- [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] macOS bg sessions inherit XPC_FLAGS=0x2 from daemon, breaking getaddrinfo DNS (curl/git "Could not resolve host") for all Bash tool commands
- [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
- [BUG] statusLine context_window.used_percentage drops to 0 after an API error: synthetic assistant entries carry all-zero usage
- [BUG] Claude apps gateway: CLI and VS Code sharing a session present a stale refresh token; IdP with rotating tokens revokes the chain and both clients are logged out
- Desktop-bundled Claude Code (2.1.255) crashes on macOS 12 Monterey with dyld Symbol not found: _DNSServiceGetAddrInfoEx — worked until yesterday
- 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