[BUG] Invalid API key on MacOS
Environment
- Platform (select one):
- [x] Anthropic API
- Claude CLI version: 0.2.38 (Claude Code)
- Operating System: macOS 15.3
- Terminal: Terminal App
Bug Description
I have logged in to Claude Code successfully, but in terminal, the input area becomes grey and does not allow enter any prompts. (Return does not work).
Subsequent start of Claude also gives this error.
Invalid API key · Please run /login
My account is defined with Developer Role in our organization, but it still reads an api-key somewhere and reject it.
From where does Claude read the api-key?
Steps to Reproduce
Here are the steps to reproduce:
brew uninstall npm
brew uninstall node
rm -Rf ~/.npm-global
rm -Rf ~/.npm
rm -Rf ~/.claude
rm -Rf ~/.claude.json
brew install npm
brew install node
npm install -g npm@11.2.0
npm install -g @anthropic-ai/claude-code
Expected Behavior
Login successfully and execute prompts.
Actual Behavior
Getting Invalid API key · Please run /login
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗