[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

  1. Install Claude Code via npm install -g @anthropic-ai/claude-code
  2. Navigate to any project directory
  3. Run claude
  4. When prompted with "Missing API key · Run /login", run /login
  5. Complete OAuth authentication in browser successfully
  6. Claude Code displays "Login successful"
  7. Run any command (e.g., /status, /help, or any natural language prompt)
  8. 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
  • /status should show Auth Token: [some-value] instead of Auth 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

  • /login completes OAuth flow and reports "Login successful"
  • No authentication token is ever persisted to disk
  • /status always shows Auth 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

  1. Token persistence mechanism on Linux systems
  2. File permissions and config directory handling in ~/.config/claude/
  3. OAuth token storage after successful authentication flow
  4. Differences between authentication handling on Linux vs macOS/Windows

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗