[BUG] Claude Pro subscription returns 401 on every API call after successful login (macOS)

Resolved 💬 3 comments Opened Apr 27, 2026 by gaiaz Closed Apr 30, 2026

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

  1. Run claude
  2. Select "1. Claude account with subscription"
  3. Complete OAuth login in browser
  4. Welcome screen shows correct plan (Claude Pro)
  5. 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

  1. Run claude in terminal
  2. Select "1. Claude account with subscription"
  3. Complete OAuth login in browser
  4. Welcome screen correctly shows "Sonnet 4.6 · Claude Pro"
  5. Type any message or command
  6. 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" />

View original on GitHub ↗

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