Login failed: getaddrinfo ENOTFOUND alb-cache - OAuth callback exposes internal hostname
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)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment:
Claude Code version: 2.1.87
OS: macOS
Network: Multiple networks tested (university WiFi + mobile hotspot)
Bug description:
After completing browser OAuth authorization, login fails in terminal with:
Login failed: getaddrinfo ENOTFOUND alb-cache
The OAuth flow uses this redirect_uri:
https://platform.claude.com/oauth/code/callback
After browser authorization succeeds ("You're all set up"), Anthropic's servers attempt to deliver the token back to my machine via a hostname called alb-cache, which is an internal Anthropic infrastructure name that cannot be resolved externally. This happens on every network I've tried.
What I've verified:
Network connectivity to api.anthropic.com is fine (Node.js resolves and connects successfully)
Browser auth completes successfully every time
Token never reaches the terminal
~/.claude.json contains a userID but no auth token
DISABLE_TELEMETRY=1 does not fix the issue
Clearing ~/.claude.json and ~/.claude/ and retrying does not fix the issue
What Should Happen?
Expected behavior: Login should complete successfully after browser authorization.
Actual behavior: Terminal receives ENOTFOUND alb-cache — an internal Anthropic hostname that should never be exposed to end users.
Error Messages/Logs
Welcome to Claude Code v2.1.87
Unable to connect to Anthropic services
Failed to connect to api.anthropic.com: ENOTFOUND
Please check your internet connection and network settings.
Steps to Reproduce
Run claude from the terminal
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.87 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
Attempted debugging was via conversations with Claude desktop
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗