[BUG] Missing API key · Run /login - Invalid API key · Please run /login
Resolved 💬 16 comments Opened Aug 6, 2025 by timyal Closed Jan 15, 2026
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [X] Other: Claude Code CLI
- Claude CLI version: 1.0.69
- Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
- Terminal: Termius
Bug Description
Even after logging in with Calude Max account we see "Missing API key · Run /login". When we try to send a prompt we get; Invalid API key · Please run /login
Steps to Reproduce
- Login
- Missing API key · Run /login appears
Expected Behavior
Not using API
Actual Behavior
As if it is trying yo use API?
Additional Context
Is this a part of coming weekly, monthly usage limits that we HAVE TO provide API keys?
16 Comments
Found 3 possible duplicate issues:
If your issue is a duplicate, please close it and 👍 the existing issue instead.
<sub>This issue will be automatically closed as a duplicate in 3 days if there are no additional comments. To prevent auto-closure, please 👎 this comment.</sub>
🤖 Generated with Claude Code
I see lots of duplicate issues, but none shows a clear solution...
Check this [https://github.com/anthropics/claude-code/issues/5118](url)
Downgrading to 1.0.67 did the trick for me. Do not forget to /login and close the Claude and reopen.
Aye can confirm that worked out really well, appreciate it @timyal!
Still usign 1.0.67. Even after 1.0.84 update...
I tried lots of things, unistalled, removed folder, re installed global, local, re login, logout, re login, migrate etc... None works....
Same issue here, with
1.0.88!Still same after 1.0.92 update!!! Still using 1.0.67.
I did everything the support team suggested, but no one is able to tell "why" 1.0.67 works, while others can not?!
Same problem here. Using SSH and claude code on multiple machines. Mac.
Got this in v2.0.26 Today, 24.10.2025 - how is this bug not solved yet?
[BUG] AWS Bedrock Authentication Fails with "Missing API key" in v2.0.26
Environment
AWS_BEARER_TOKEN_BEDROCKBug Description
AWS Bedrock authentication via the
AWS_BEARER_TOKEN_BEDROCKenvironment variable fails with the error:Even after setting the environment variable correctly, Claude Code throws:
Steps to Reproduce
``
powershell
``$env:AWS_BEARER_TOKEN_BEDROCK="your-bedrock-token-here"
``
bash
``claude
/loginExpected Behavior
When
AWS_BEARER_TOKEN_BEDROCKis set, Claude Code should:Actual Behavior
AWS_BEARER_TOKEN_BEDROCKas valid authenticationvalidateHeaders()function throws authentication errorRoot Cause Analysis
The
validateHeaders()function (atcli.js:357:930) only checks forapiKeyandauthToken:Missing: Check for
process.env.AWS_BEARER_TOKEN_BEDROCKThe Bedrock token support was added in v1.0.51 (CHANGELOG.md:423), but the validation logic was never updated to recognize it.
Error Stack Trace
Proposed Fix
Update
validateHeaders()to check for Bedrock authentication:Workaround
Users experiencing this issue can:
Option 1: Downgrade to v1.0.67 (confirmed working)
Option 2: Use OAuth Authentication
Additional Context
Related Issues
Version History
AWS_BEARER_TOKEN_BEDROCKsupport addedImpact
Similar Certificate Error
Some users also encounter TLS errors:
This is a separate corporate proxy/certificate issue and should be addressed independently.
Testing Checklist
After implementing the fix, verify:
AWS_BEARER_TOKEN_BEDROCKauthentication worksANTHROPIC_API_KEYauthentication still worksFiles to Modify
Primary:
src/client.tsor similar, compiled tocli.js:357)Functions to update:
validateHeaders()- Add Bedrock/Vertex checksTesting:
---
Priority: 🔴 High - Blocking Bedrock users from using Claude Code
Difficulty: Easy - Single function fix
Breaking Change: No - Only adds missing validation check
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.
still happening
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.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
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.