[BUG] Claude Pro authentication not persisting on Linux
Resolved 💬 7 comments Opened Aug 14, 2025 by alainsharemat Closed Mar 1, 2026
Bug Description
Claude Code authentication via /login appears successful but the authentication token is never persisted to disk. This makes it impossible to use Claude Pro subscription with Claude Code on Linux systems, as users are repeatedly prompted to re-authenticate after every command.
Environment Info
- Platform: linux (Pop!_OS 22.04 LTS)
- Terminal: GNOME Terminal 3.44.0
- Claude Code Version: 1.0.80
- Node.js: v21.3.0 (installed via nvm 0.35.3)
- npm: 10.2.4
- Account: Claude Pro subscription (verified working on claude.ai web interface)
Steps to Reproduce
- Install Claude Code via
npm install -g @anthropic-ai/claude-code - Navigate to any project directory
- Run
claude - When prompted with "Missing API key · Run /login", run
/login - Complete OAuth authentication in browser successfully
- Claude Code displays "Login successful"
- Run any command (e.g.,
/status,/help, or any natural language prompt) - Result: "Invalid API key · Please run /login" - authentication is lost
Expected Behavior
After successful /login and OAuth completion:
- Authentication token should be saved to
~/.config/claude/or similar location /statusshould showAuth Token: [some-value]instead ofAuth Token: none- Subsequent commands should work without re-authentication
- Users with Claude Pro should be able to use their subscription instead of API keys
Actual Behavior
/logincompletes OAuth flow and reports "Login successful"- No authentication token is ever persisted to disk
/statusalways showsAuth Token: none- Every single command requires re-running
/login - Users are forced to use API keys as workaround
Additional Context
System Configuration
$ ls -la ~/.config/claude
drwxr-xr-x 2 user user 4096 Aug 14 16:08 .config/claude
# Directory exists with correct permissions
$ claude --version
1.0.80
$ /status (after successful /login)
Auth Token: none
API Key: ANTHROPIC_API_KEY # only when using workaround
Workaround That Works
export ANTHROPIC_API_KEY="sk-ant-api03-..."
claude # Works perfectly with API key
Reproduction Consistency
- This issue is 100% reproducible on this system
- Occurs regardless of project directory
- Happens whether skipping terminal setup or not
- Authentication never persists across any Claude Code session
Severity
High - This completely prevents Claude Pro users from using their paid subscription with Claude Code on Linux systems. Users are forced to pay additional API costs despite already having a Pro subscription.
Environment Variables Tested
ANTHROPIC_API_KEY- Works as workaround but shouldn't be necessary for Pro users- No relevant Claude-specific environment variables found in documentation
Suggested Investigation Areas
- Token persistence mechanism on Linux systems
- File permissions and config directory handling in
~/.config/claude/ - OAuth token storage after successful authentication flow
- Differences between authentication handling on Linux vs macOS/Windows
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗