[BUG] Authentication fails immediately after successful /login in Claude Code v1.0.71
Title: Authentication fails immediately after successful /login in Claude Code v1.0.71
Description:
Bug Report
Version: Claude Code v1.0.71Platform: macOS (Darwin 24.6.0)Installation: Native (Homebrew)
Summary
After successfully logging in with /login, Claude Code immediately shows "Invalid API key" for any user input and becomes completely unusable. This appears to be a critical authentication regression in v1.0.71.
Steps to Reproduce
- Start Claude Code in any directory
- Run /login and select "Anthropic Console account"
- Complete OAuth authentication successfully (shows "Login successful")
- Try to send any message to Claude
- Claude Code responds with "Invalid API key · Please run /login"
Expected Behavior
After successful OAuth login, Claude Code should accept and process user messages normally.
Actual Behavior
- /login shows "Login successful"
- Status bar continues to show "Missing API key · Run /login"
- Any user input results in "Invalid API key · Please run /login"
- Claude Code becomes completely unusable
Additional Context
- Authentication works from some directories but not others (directory-specific bug)
- OAuth credentials are stored correctly in config but not recognized by Claude Code
- Issue persists across multiple login attempts
- Environment variable ANTHROPIC_API_KEY was previously rejected and is in the rejected list
- /status shows Auth Token: none even after successful login
Configuration Details
- installMethod: "unknown" (may be related)
- Had MCP server configured (BigQuery) but removed it during troubleshooting
- Config file was previously large (4.6MB) due to excessive conversation history
- Issue persists even after cleaning config file
Workarounds Attempted
- Multiple /login attempts
- Unsetting ANTHROPIC_API_KEY environment variable
- Resetting project-specific configuration
- Removing and re-adding API keys
- Installing Google Cloud SDK and Python 3.11 (for MCP server)
Impact
This makes Claude Code completely unusable for affected users. The authentication system appears to have a critical regression that prevents normal operation despite successful login.
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5244
- https://github.com/anthropics/claude-code/issues/5118
- https://github.com/anthropics/claude-code/issues/5167
If your issue is a duplicate, please close it and 👍 the existing issue instead.
This issue will be automatically closed as a duplicate in 3 days if there are no additional comments. To prevent auto-closure, please 👎 this comment.
🤖 Generated with Claude Code
I have the same issue!
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
same issue
same issue