[BUG][Max Plan] OAuth Login Blocked - 'OAuth token has expired' Error on Every Login Attempt
Resolved 💬 3 comments Opened Jun 7, 2025 by ajithsapa Closed Jun 7, 2025
Environment
- Platform (select one): Anthropic API
- Claude CLI version: 1.0.17 (Claude Code)
- Operating System: macOS 15.4.1
- Terminal: iTerm2
- Account type: Claude Max subscription (active, paid)
Bug Description
Cannot login to Claude Code with Max subscription. The OAuth authentication fails immediately with an expired token error, preventing any use of Claude Code. This was working previously - Claude Code was functioning normally until recently when it started showing this OAuth error.
Steps to Reproduce
- Install Claude Code: npm install -g @anthropic-ai/claude-code
- Run claude login
- Attempt to type login at the prompt
- Immediately receive error: API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."}}
Expected Behavior
- Should be presented with login options (1. Anthropic Console, 2. Claude app)
- Should be able to select option 2 for Max subscription
- Should complete OAuth flow and access Claude Code with unlimited usage
Actual Behavior
- OAuth error occurs before even being able to select a login method
- Cannot proceed past the error
- Completely blocked from using Claude Code despite active Max subscription
- Was working fine previously, but now persistently fails with OAuth token expiration error
What I've Tried:
- Complete uninstall and reinstall of Claude Code
- Cleared all configuration files:
rm -rf ~/.claude
rm -rf ~/Library/Application\ Support/ClaudeCode
npm cache clean --force
- Killed all Claude processes
- Checked macOS Keychain Access - no Claude entries found
- Updated to latest version
Impact:
- Cannot access Claude Code at all despite paying for Max subscription
- Only workaround would be using API keys which would incur additional charges
- Max subscription should include unlimited Claude Code usage via OAuth
- Service was working but is now completely inaccessible
Additional Context
The error suggests a circular dependency where the login command itself requires valid authentication. The OAuth token appears to have expired and there's no way to refresh it through the normal login flow.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗