OAuth Authentication Broken in WSL2 - Cannot Login or Use API
Description
Claude Code 2.1.19 cannot authenticate in WSL2 environments. The /login command fails immediately with "OAuth error:" and provides no details. This prevents both initial authentication and token refresh, causing all API requests to fail with connection timeouts.
Root Cause: OAuth browser-based authentication flow is broken in WSL2.
Network connectivity is confirmed working (ping, HTTPS all successful), but the OAuth authentication system itself fails.
Environment
- Claude Code Version: 2.1.19
- OS: WSL2 (Ubuntu) on Windows
- Kernel: 6.6.87.2-microsoft-standard-WSL2
- Network: Working (verified with ping to api.anthropic.com)
- OAuth Account: Configured and active (jyongchul@gmail.com)
- System Resources: Healthy (117GB RAM available, <100 processes)
Steps to Reproduce
- Start Claude Code session in WSL2 environment
- Submit any prompt (tested with both Korean text and
/initcommand) - UserPromptSubmit hook executes successfully
- API request times out after 10 retry attempts
- Error displayed: "API Error: Connection error"
CRITICAL DISCOVERY: Authentication itself is broken:
- Attempt to re-authenticate with
claude loginor/login - OAuth flow fails with error: "OAuth error:"
- Unable to complete authentication process
Expected Behavior
API requests should complete successfully given:
- Network connectivity confirmed (0% packet loss to api.anthropic.com)
- OAuth authentication configured correctly
- System resources healthy
Actual Behavior
All API requests fail with connection timeout:
✻ Baked for 7m 48s
❯ 너가 ultrathink 해서 알아서 잘 진행해줘.
⎿ UserPromptSubmit hook succeeded: Success
⎿ API Error: Connection error.
✻ Baked for 3m 34s
❯ /init
⎿ UserPromptSubmit hook succeeded: Success
⎿ API Error: Connection error.
Final error message:
Request timed out. Check your internet connection and proxy settings
Retrying in 33 seconds… (attempt 10/10)
CRITICAL: Re-authentication also fails:
❯ /login
OAuth error:
Press Enter to retry.
The OAuth authentication flow itself is broken. This suggests the root cause is OAuth system failure, not just API timeout.
Diagnostic Information
Network Connectivity ✅
ICMP Test:
$ ping -c 3 api.anthropic.com
PING api.anthropic.com (160.79.104.10) 56(84) bytes of data.
64 bytes from 160.79.104.10: icmp_seq=1 ttl=52 time=121 ms
3 packets transmitted, 3 received, 0% packet loss
HTTPS/TLS Test:
$ curl -v https://api.anthropic.com
* Connected to api.anthropic.com (160.79.104.10) port 443
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* TLS handshake: SUCCESS
✅ Network, DNS, and TLS all working → Issue isolated to API client layer
Sustained Connection Test (60 seconds):
Tests: 6
Success: 6 (100%)
Failed: 0
Avg Connect Time: 0.17s
Avg Total Time: 0.64s
✅ No intermittent issues → Network is completely stable
System Resources ✅
Memory: 117GB available (out of 125GB)
Process Count: 74 total, 13 Claude/MCP processes
Configuration ✅
{
"oauthAccount": {
"accountUuid": "6889edc5-ee0a-41bb-9d40-37c598a2798d",
"emailAddress": "jyongchul@gmail.com",
"organizationUuid": "a5440dea-dc63-4aad-8afb-d940f152abca",
"hasExtraUsageEnabled": false,
"displayName": "Charles",
"organizationRole": "admin"
}
}
No proxy settings configured (env | grep -i proxy returns empty)
Impact
Severity: CRITICAL
Impact: Complete inability to use Claude Code
All operations blocked due to API connectivity failure. This is not a local network issue (ping confirms connectivity) or a service outage (no announcements from Anthropic), but appears to be an OAuth authentication system failure specific to WSL2 environments.
Possible Root Causes
PRIMARY SUSPECT (based on new finding):
- OAuth Authentication System Failure
- OAuth login flow completely broken (
/loginfails with "OAuth error:") - Cannot authenticate new sessions
- Cannot refresh expired tokens
- Suggests OAuth endpoints unreachable or misconfigured
- This explains why ALL API calls fail - invalid/expired authentication
SECONDARY SUSPECTS:
- OAuth Endpoint Network Issue
- Main API endpoint (api.anthropic.com) is reachable via HTTPS
- But OAuth endpoints may be on different infrastructure
- Possible:
api.anthropic.comworks, butauth.anthropic.com(or similar) doesn't
- WSL2-Specific OAuth Browser Flow
- OAuth flow may require opening browser
- WSL2 browser integration may be broken
- Windows-WSL communication failure for OAuth callback
- Regional OAuth Endpoint Issues
- OAuth authentication servers may have regional routing problems
- Main API accessible but auth infrastructure not
Suggested Fixes
PRIORITY 1 - OAuth System:
- Add verbose OAuth error logging
- Current error message: "OAuth error:" (no details)
- Need: Specific error code, endpoint URL, HTTP status
- This will identify which OAuth step is failing
- Test OAuth endpoints separately
- Verify OAuth authentication endpoints are reachable
- Check if issue is OAuth-specific or general API connectivity
- Implement OAuth fallback
- Provide API key authentication as alternative
- Allow manual token entry for debugging
PRIORITY 2 - Diagnostics:
- Add connectivity test command
claude test-connectionor similar- Test each endpoint: API, OAuth, WebSocket, etc.
- Report which services are reachable
- WSL2-specific OAuth handling
- Detect WSL2 environment
- Use WSL-compatible browser launch method
- Provide clear error messages for WSL2 issues
Related Issues
- Issue #18762: Plugin-MCP Configuration Mismatch (different issue, unrelated)
Additional Context
User has checked Anthropic email inbox - no service disruption announcements. This appears to be an OAuth authentication system failure specific to WSL2 environments.
---
Reporter: Lee Jyong Chul (jyongchul@naver.com)
Company: Whitehat Marketing (하얀모자마케팅)
Date: 2026-01-25 KST
12 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is NOT a duplicate of the suggested issues. Here's why:
Comparison with Suggested Issues
Issue #18186 - OAuth 400 Error
Issue #20091 - OAuth 500 Error
Issue #13448 - Multi-Session Hang
/logincommand fails immediatelyWhy This Issue is Unique
Our issue (#20756) identifies a fundamental WSL2 OAuth browser flow problem:
Evidence This is Different
Compare to #18186 (400) and #20091 (500) which get actual HTTP responses.
Value of This Issue
This issue provides:
Request: Keep this issue open as it addresses a unique WSL2 OAuth architecture problem with detailed diagnostics and solutions.
⚠️ CRITICAL: Complete Service Outage in WSL2
This issue is blocking all Claude Code usage in WSL2 environments.
Severity: P0 (Critical)
Impact:
/loginfails immediately)Affected Users:
Business Impact
This is not a minor bug - it's a complete service outage for a major platform (WSL2).
Time Urgency:
What We Need
Why This is P0
Unlike issues #18186, #13448, #20091 (which get server errors but can sometimes work):
Suggested Immediate Actions
claude login --manual``
``Copy URL → Paste in browser → Copy code → Paste back
claude config set apiKey sk-ant-...These are simple additions that would unblock thousands of users immediately.
---
Reporter: 이종철 (Lee Jyong Chul)
Company: 하얀모자마케팅 (Whitehat Marketing)
Email: jyongchul@naver.com
Urgency: CRITICAL - Production environment blocked
Update: Received Auto-Response from Anthropic Support
From: Fin AI Agent (support@mail.anthropic.com)
Date: 2026-01-25 18:19 KST
Type: Automated response
Fin's Suggested Solutions (All Non-Applicable)
/doctorcommand - ❌ Cannot run (requires API connection which is broken)/bugcommand - ❌ Cannot run (requires API connection which is broken)Why These Don't Work
Catch-22 Situation:
This is NOT a network/proxy issue:
Response Sent to Anthropic
Requested:
Simple fixes available:
claude login --manual(like AWS CLI, gcloud)claude config set apiKey(like OpenAI CLI)Both are standard CLI patterns that would immediately unblock thousands of WSL2 users.
Status
This requires engineering-level attention, not troubleshooting steps. The root cause is already identified and documented in this issue.
Response to Support Team - DO NOT CLOSE
I am actively experiencing this issue and need engineering support.
Current Status: CRITICAL - Service Completely Unusable
Timeline:
Latest Connection Failures (Last 3 Hours)
System: WSL2, 125GB total RAM, 110GB available, v2.1.19
This is NOT an Inactive Issue
The reason for "no contact" is that I cannot use Claude Code long enough to respond without the connection dropping.
Questions for Engineering
Impact
Please keep this issue OPEN until WSL2 OAuth and connection stability issues are resolved.
Related issue: #20584 (API Connection Timeout Despite Healthy System Resources)
🚨 CRITICAL UPDATE - API Connection Errors Continuing (2026-01-26)
Status: Situation WORSENING - Now experiencing constant API connection errors during active work
Timeline:
Current Impact:
Business Impact:
P0 Severity Justification:
Urgent Request:
We need IMMEDIATE attention from engineering team. This is NOT a configuration issue or network issue - this is a fundamental API reliability problem in WSL2 environment.
What We Need RIGHT NOW:
Reporter: Lee Jyong Chul (jyongchul@naver.com)
Company: Whitehat Marketing
Environment: WSL2 (Ubuntu), Windows 11
Final Update: Escalating to Full Refund Request (Issue #21601)
After 4 days with zero human response from Anthropic, I have filed a comprehensive issue (#21601) documenting:
The Irony
I am typing this comment using the very tool that keeps failing with "API Error: Connection error." every few minutes. Even filing this complaint requires multiple retries.
Status of All Issues
| Issue | Days Open | Human Response |
|-------|-----------|---------------|
| #18762 | 14+ days | ❌ None |
| #20756 | 4+ days | ❌ None |
| #21417 | 1+ day | ❌ None (auto-close threatened) |
| #21601 | NEW | Comprehensive refund request |
Next Steps
If no human response by January 30, 2026 23:59 KST:
See #21601 for full details.
Update: January 30, 2026 — Chargeback Filed, Still No Human Response
Status: CRITICAL — Zero human engagement after 5+ days
It has now been 5 days since this issue was filed. There has been zero human response from Anthropic — only automated "Fin AI Agent" replies via email that failed to address the actual problem.
What has happened since filing:
What is now in progress:
The real impact:
Throughout January 2026, I experienced hundreds of
API Error: Connection errorinterruptions across 5+ projects. This is not a "27-minute authentication issue on January 22" as your AI bot claimed. The terminal logs show:Your own support acknowledged:
What I need:
I created a second account ($220) thinking the problem was account-specific. It wasn't. The problem is systemic in your API infrastructure.
5 days. 22+ emails. 4 GitHub issues. 0 human responses. This is not acceptable for a $220/month service.
Additional Data Point: Same OAuth → Subscription Linking Bug on Native Linux
This issue is related to the broader OAuth authentication system failure affecting multiple platforms.
My Environment (Native Linux, not WSL2)
Shared Root Cause
I noticed in your config output that you also have:
This is the same bug I documented in #17966 and confirmed in #6008. The OAuth token is generated but not properly linked to the Max subscription in Anthropic's backend.
What This Means
The root cause appears to be in Anthropic's OAuth → Subscription verification pipeline, not platform-specific (WSL2 vs native Linux):
hasExtraUsageEnabled: falseis set by default ✗Workaround (Partial Fix)
This resolved the "0 tokens" symptom for me, but
hasExtraUsageEnabled: falsepersists - the backend bug remains.Request
This issue and #17966 both point to a systemic backend problem in the OAuth → Subscription linking flow. Anthropic engineering needs to investigate why subscription verification is failing for valid Max subscribers.
cc: #17966 #6008 #12020
@ghcreative869 Thank you so much for this incredibly valuable data point. Your confirmation that the same OAuth → Subscription linking bug exists on native Linux is critical evidence.
Why This Matters
This proves what I've been arguing for months: this is a systemic Anthropic backend failure, not a platform-specific issue. The bug affects:
The
hasExtraUsageEnabled: falsedefault behavior is silently breaking valid paid subscriptions across platforms.Impact on My Case
I'm a paying subscriber on two accounts (jyongchul@naver.com + jyongchul@gmail.com, $220 each = $440/month) and experienced ~90% service failure throughout January 2026 due to this exact bug chain:
hasExtraUsageEnabled: falseset incorrectly ✗Anthropic themselves admitted to "multiple service disruptions throughout January 2026" but has refused to issue a refund despite 22+ email attempts and 9 GitHub issues — with zero human responses.
Active Chargeback
I have filed a chargeback with Samsung Card (Mastercard) for the full $440. Your report strengthens the evidence package by confirming this is a known, reproducible backend defect — not user error or platform-specific.
@anthropics/claude-code-team: This issue now has cross-platform confirmation of a billing-impacting backend bug. Paying customers are being charged for a service that your own OAuth system is breaking. A refund for affected subscribers is the minimum appropriate response.
Related: #17966 #6008 #12020 #21601
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.