Locked out of Claude Code - `/login` disabled
Environment
- Platform (select one):
- Terminal: ghostty
Bug Description
I'm basically locked out of claude code.
I wanted to try using my Pro account for Claude Code. I tried doing an npm uninstall and reinstall. But it was still picking up the API keys, so then I deleted the API key hoping to force /login to work.
Which now results in claude code throwing an error: Invalid API key · Please run /login.
Trying to re-create API keys under the Claude Code on console.anthropic.com is disabled, so I'm effectively locked out.
/status output:
Working Directory
L /Users/tauseefk/personal/claude-code-bug-report
Account • /login
L Auth Token: none
L API Key: /login managed key
Model • /model
L Default (claude-sonnet-4-20250514)
Steps to Reproduce
- delete Claude Code API key from console
npm uninstall -g @anthropic-ai/claude-coderm ~/.claude.jsonrm -rf ~/.config/npm i -g @anthropic-ai/claude-codeclaude/login
Expected Behavior
/login would open browser window prompting to login to the console
Actual Behavior
/login command doesn't exist, so I'm locked out.
Additional Context
Guidelines on how to completely clear out claude code, and re-install would be super helpful. And maybe deleting the API key under the claude code workspace should be disabled until we can get the login-from-scratch behavior reinstated.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗