[BUG] 401 "Invalid API key" authentication error on Windows with Claude Pro subscription
Resolved 💬 2 comments Opened Feb 24, 2026 by DucHieu2003 Closed Feb 24, 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?
Description
After logging in successfully with Claude Pro subscription, every API call returns
a 401 authentication error. Login succeeds but actual requests fail immediately.
Environment
- Claude Code version: v2.1.52
- OS: Windows 10 (10.0.19045)
- Shell: PowerShell
- Node.js version: [chạy
node -vrồi điền vào đây] - Auth method: claude.ai (OAuth)
- Subscription: Claude Pro
Auth Status
{
"loggedIn": true,
"authMethod": "claude.ai",
"apiProvider": "firstParty",
"email": "***@gmail.com",
"orgId": "***",
"orgName": "***'s Organization",
"subscriptionType": "pro"
}
### What Should Happen?
..
### Error Messages/Logs
```shell
401 {"type":"error","error":{"type":"authentication_error","message":"Invalid API key"}}
Retrying in 14 seconds… (attempt 6/10)
Steps to Reproduce
..
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.52
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗