[BUG] Missing API key · Run /login on Max subscription
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version:
- Operating System:
- Terminal:
Bug Description
Steps to Reproduce
- /login
- Missing API key · Run /login
Expected Behavior
I can't login
Actual Behavior
Missing API key · Run /login
After logging in i keep getting this error which means I cant use it.
Additional Context
L Session ID: 63b87ca3-598a-47bb-9a95-2d932fcf5526
Working Directory
L /Users/bart/dev
Account
L Auth Token: none
Memory • /memory
L user: ~/.claude/CLAUDE.md
Model • /model
L Default (claude-sonnet-4-20250514)```
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5118
- https://github.com/anthropics/claude-code/issues/2227
- https://github.com/anthropics/claude-code/issues/5151
If your issue is a duplicate, please close it and 👍 the existing issue instead.
🤖 Generated with Claude Code
Duplicated the issue here with a fresh install on a fresh machine. Authentication seems to work, but the client is not authenticated.
After logging into claude, it says the api key is invalid. Confirmed that the .credentials.json file doesn't exist, and there are no new API keys created in my Anthropic account.
Temp workaround: I got this working on the new machine by copying the following files/directories from the old (working) device to the new device:
~/.claude/*~/.claude.json~/.claude.json.backup{[project/directory}}/.claude/*
This uses the same API key for both machines, which is not ideal, but it got the new machine up and running. I'll re-auth once Anthropic fixes the bug.
Hopefully this helps!
@duanehutchins Thanks! I did end up downgrading to the lower version. not ideal but going to work with that until there is a fix
Same issue but downgrading does not solve the problem
seeing this too
Same issue here
+1
Same issue but downgrading does not solve the problem
+1
same issue
I have the same issue.
Same issue. I tried copying files from another machine per @duanehutchins suggestion. That removed the missing API key error, but meant I was working off my API account, which I don't want given I want to use my pro plan. So tried to login using my pro plan. Auth went through fine, but then the Missing API key error came back.
I was able to downgrade to .67. That worked, then later on in the day i upgraded to .69 and that worked. Now I woke up and its happening again
I was able to downgrade to 1.0.67 and it worked. Here are my steps that helped me:
1.npm install -g @anthropic-ai/[email protected]
2. mv ~/.claude ~/.claude.backup Move the local claude files over
3. Remove the alias to claude from .zshrc
4. start a new terminal
5. claude
This issue is still happening I'm noticing it happens every day maybe 24 hours? The way I fix it is:
- Uninstall Claude Code
- Install 1.00.67
- LogIn
- /Exit
- Open Claude Code
This resolves the problem temporarily for at least 24 hours.
Seeing most people have this problem with SSH and mosh.
Still happening for me on Mac
still happening for me too. having to constantly downgrade versions and re-login
The same issue here. Downgrading is working, but not ideal. I ssh into my host and run Claude Code there
Same here
The same issue here. Downgrading is working, but not ideal. I ssh into my host and run Claude Code there
same here!