claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] /login not present in console, can't redo the auth

Open mkacki98 opened this issue 7 months ago • 2 comments

Environment

  • Platform (select one):
    • [ X ] Anthropic API
  • Claude CLI version: 1.0.3
  • Operating System: macOS 15.5
  • Terminal: iTerm2

Bug Description

I can't re-do the auth.

/login and /logout command are not available from my Claude Code CLI. It stores the token somewhere, so even after deleting .claude and .claude.json (I don't have the auth in .config/ as the docs pointed out), it still doesn't prompt me to re-do the auth.

Commands like /help, /status etc. work.

I have completed the OAuth once already, and used Claude Code, but it was using my private key, so I wanted to re-do the auth to join my company's organisation.

Steps to Reproduce

I don't know, /login was working at some point. I don't know when it stopped (maybe after an update?).

Expected Behavior

/login to work, so I can re-do the auth with a different

Actual Behavior

Additional Context

I have also deleted all keys from my Claude Console (I spent a lot of time trying to set up company key for Claude Code to use and wanted to make sure it's not using my private keys), and therefore can't using the product.

Image Image Image Image

mkacki98 avatar May 28 '25 10:05 mkacki98

I am having a similar situation. /login was getting interpreted by the LLM rather than parsed as an actual command. I removed .claude.json hoping to trigger the initial login process and now it tells me to type /login and...

> /login
  ⎿  Invalid API key · Please run /login

ctoth avatar Jun 04 '25 19:06 ctoth

Thanks for the report! Can you try running $ claude /logout?

levpopov avatar Jun 18 '25 02:06 levpopov

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.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Dec 10 '25 10:12 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 17 '25 14:12 github-actions[bot]