Skip to content

[BUG] 401 Auth Loop - All commands fail including /login, Windows, Pro subscription** #58926

Description

@sammizyy400-alt

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

What's Wrong?
Every Claude Code command returns 401 Invalid authentication credentials immediately, including /login, /logout, and setup-token. The welcome screen shows my account correctly (name, Pro subscription, email) but all commands fail.
Steps already tried:

/logout — 401
/login — 401
claude setup-token — 401
Deleted ~/.claude folder entirely
Uninstalled and reinstalled (now v2.1.141)
Verified no ANTHROPIC_API_KEY environment variable set

Environment:

OS: Windows
Claude Code version: v2.1.141
Subscription: Claude Pro (active, paid May 9 2026)
Issue started: May 13 2026

Expected behavior:
Commands should execute normally after the welcome screen confirms a valid authenticated session.

What Should Happen?

Claude Code should authenticate API requests using my Pro subscription OAuth token. All commands should execute normally after the welcome screen confirms my account.

Error Messages/Logs

API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid authentication credentials"},"request_id":"..."}
Please run /login

Steps to Reproduce

  1. Open PowerShell on Windows
  2. Run: claude
  3. Welcome screen appears correctly showing name, Pro subscription, email
  4. Type any command or message
  5. Immediately returns: API Error: 401 Invalid authentication credentials — Please run /login
  6. Run: claude /login — returns same 401
  7. Run: claude auth logout — returns same 401
  8. Delete ~/.claude folder entirely
  9. Run: claude — welcome screen appears correctly again
  10. Type any command — same 401 immediately

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

v2.1.139

Claude Code Version

2.1.141 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Contacted Anthropic support via email they confirmed this appears to be a server-side OAuth token issue but all suggested fixes have failed. Support ticket open but unresolved after 24+ hours.

Account details: Claude Pro subscription, active and paid May 9 2026, issue started May 13 2026.

The welcome screen correctly shows my name, email, and Pro subscription on every launch, confirming the stored token is being read but it is rejected when used for API calls. This rules out a local configuration issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authbugSomething isn't workingplatform:windowsIssue specifically occurs on WindowsstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions