Auth conflict warning persists after logout: 'Both a token (claude.ai) and an API key (/login managed key) are set'
Description
After logging in with an API key once (during a usage limit period), the auth conflict warning persists even after logging out and logging back in with claude.ai only.
Warning message:
⚠Auth conflict: Both a token (claude.ai) and an API key (/login managed key) are set. This may lead to unexpected behavior.
• Trying to use claude.ai? claude /logout
• Trying to use /login managed key? claude /logout to sign out of claude.ai.
Steps to Reproduce
- Log in normally via claude.ai OAuth
- Hit usage limit
- Log in with API key via
/login - Log out (
claude auth logoutorclaude /logout) - Log back in via claude.ai OAuth
- Warning still appears on every session start
Expected Behavior
After logging out and logging back in with only claude.ai, the /login managed key credential should be cleared and the warning should not appear.
Actual Behavior
The warning persists indefinitely across logout/login cycles. The /login managed key entry in macOS Keychain (Claude Code-credentials) appears to survive the logout process.
Environment
- OS: macOS (Darwin 24.6.0)
- Auth method: claude.ai (Max subscription)
- Keychain entries found:
Claude Code(oauth token)Claude Code-credentials(persisted /login managed key — likely the root cause)
Possible Root Cause
claude auth logout may only clear the OAuth token (Claude Code keychain entry) but not the /login managed key (Claude Code-credentials keychain entry), causing the conflict warning to persist.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗