[BUG] claude /login with api key creates always new key
Resolved 💬 3 comments Opened Oct 11, 2025 by rwellinger Closed Jan 10, 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?
When I login by /login claude code creates every time a new claude_api_key and dosen't use the last used one.
What Should Happen?
Claude should use the last one used.
Error Messages/Logs
Steps to Reproduce
claude
/login
Websites open
Approve
new claude api key generated
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.14
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗