Locked out of Claude Code - `/login` disabled

Resolved 💬 2 comments Opened Jun 4, 2025 by tauseefk Closed Jun 4, 2025

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

  1. delete Claude Code API key from console
  2. npm uninstall -g @anthropic-ai/claude-code
  3. rm ~/.claude.json
  4. rm -rf ~/.config/
  5. npm i -g @anthropic-ai/claude-code
  6. claude
  7. /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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗