[BUG] OAuth /login fails with ECONNREFUSED on Windows 11, fresh install, network confirmed OK
Resolved 💬 3 comments Opened May 17, 2026 by IsmailMAJBAR Closed May 21, 2026
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?
Title: OAuth /login fails with ECONNREFUSED on Windows 11, fresh install, network confirmed OK
Environment:
- OS: Windows 11
- Claude Code: 2.1.143 (npm-global install)
- Node.js: v24.13.1
- Claude Desktop app: same ECONNREFUSED on Claude Code tab
Steps to reproduce:
- Fresh install via
npm install -g @anthropic-ai/claude-code - Run
claude→ "Welcome back!" banner displays correctly - Run
/login→ browser opens, OAuth completes on Anthropic side - Callback to localhost fails with
OAuth error: ECONNREFUSED
Network diagnostics (all passing):
curl https://api.anthropic.com/→ 404 with proper Anthropic ASCII logo responseTest-NetConnection api.anthropic.com -Port 443→ TcpTestSucceeded: Trueping 127.0.0.1→ 0% loss- DNS: Cloudflare + Google (IPv4 + IPv6)
- No HTTPS_PROXY / HTTP_PROXY / ANTHROPIC_* env vars
- No custom URLs in .claude.json
- netsh excluded port ranges: only 50000-50059 (normal)
Also tested:
- Multiple browsers (Opera, Chrome) → same ECONNREFUSED on callback
- Removed
.claude.jsonand.claude/→ re-init OK but /login still fails - Both OAuth flow and desktop app "Claude Code" tab produce same error
Workaround in use: desktop app chat tab works fine, only /login flow and Claude Code tab affected.
What Should Happen?
to be able to use claude code
Error Messages/Logs
Steps to Reproduce
Steps to reproduce:
- Fresh install via
npm install -g @anthropic-ai/claude-code - Run
claude→ "Welcome back!" banner displays correctly - Run
/login→ browser opens, OAuth completes on Anthropic side - Callback to localhost fails with
OAuth error: ECONNREFUSED
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.143
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗