[BUG] Claude Pro subscription returns 401 on every API call after successful login (macOS)
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.119
- OS: macOS (Apple Silicon — MacBook Pro)
- Shell: zsh
- Subscription: Claude Pro
- Authentication method: claude.ai account (OAuth)
What's wrong
After successful login, the welcome screen correctly shows "Sonnet 4.6 · Claude Pro" but every command immediately returns:
Please run /login · API Error: 401
{"type":"error","error":{"type":"authentication_error","message":"Invalid authentication credentials"}}
Steps to reproduce
- Run
claude - Select "1. Claude account with subscription"
- Complete OAuth login in browser
- Welcome screen shows correct plan (Claude Pro)
- Type any message → 401 error
What I tried
- rm -rf ~/.claude && rm ~/.claude.json
- /logout then /login
- npm update -g @anthropic-ai/claude-code (now on 2.1.119)
- Removed ANTHROPIC_API_KEY from environment
- Removed oauthAccount and tengu_vscode_cc_auth from ~/.claude.json manually
Expected behavior
Claude Code should work with an active Claude Pro subscription.
Note
This worked until approximately April 22, 2026. Related issues: #28155, #44092
What Should Happen?
Claude Code should work normally with an active Claude Pro subscription. After login, commands should execute without authentication errors.
Error Messages/Logs
Please run /login · API Error: 401
{"type":"error","error":{"type":"authentication_error","message":"Invalid
authentication credentials"},"request_id":"req_011CaU1HG2TL8jZZ5wVpPus1"}
Steps to Reproduce
- Run
claudein terminal - Select "1. Claude account with subscription"
- Complete OAuth login in browser
- Welcome screen correctly shows "Sonnet 4.6 · Claude Pro"
- Type any message or command
- 401 error appears immediately
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
2.1.119 (Claude Code)
Claude Code Version
2.1.119 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
<img width="496" height="243" alt="Image" src="https://github.com/user-attachments/assets/afe2a7f8-8cc5-4a65-bd07-e3963f83ef42" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗