[BUG]
VSCode Cannot authenticate claude code chat but am logged in claude code auth tried every troubleshoot option + more
- Platform (select one):
- [ ] Anthropic API 2. Report this bug at https://github.com/anthropics/claude-code/issues with:
- Your OS: macOS (Darwin 24.6.0)
- Claude Code version: 1.0.89
**Login loop not using API as suggested
"
Error
🔐 Login Required
Your Claude API key is invalid or expired.
A terminal has been opened - please run the login process there.
After logging in, come back to this chat to continue."
"
⏺ Great! Now that you've logged in to
Claude Code, you should be able to
use the chat interface without the
API key error.
The "Restore checkpoint" option
should now work, and you can
continue your conversation with
Claude Code normally. Try clicking
"Restore checkpoint" or starting a
new message in the chat interface."
**Then claude code works but not the claude code chat it just keeps me in this loop.
"Claude auth status │
│ Check authentication status after reinstall │
│ │
│ Do you want to proceed? │
│ ❯ 1. Yes │
│ 2. Yes, and don't ask again for claude auth status commands in /Users/cdmxx/Downloads/bhabit-presentation │
│ 3. No, and tell Claude what to do differently (esc) "
**Have tried with and without after fresh uninstall/reinstall
" │
│ unset ANTHROPIC_API_KEY │
│ Unset the problematic API key environment variable │
│ │
│ Do you want to proceed? │
│ ❯ 1. Yes │
│ 2. Yes, and don't ask again for unset commands in /Users/cdmxx/Downloads/bhabit-presentation │
│ 3. No, and tell Claude what to do differently (esc) "
⏺ Bash(claude auth status)
⎿ Error: Invalid API key · Fix external API key
⏺ The environment variable is still set in your shell profile. You need to remove it from your shell
configuration file (like .bashrc, .zshrc, or .profile).
Check which shell you're using and then edit the appropriate file:
⏺ Bash(echo $SHELL)
⎿ Running…
╭──────────────────────────────────────────────────────I have done everything
workflow
➜ bhabit-presentation claude
╭────────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code! │
│ │
│ /help for help, /status for your current setup │
│ │
│ cwd: /Users/cdmxx/Downloads/bhabit-presentation │
╰────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ > Try "edit <filepath> to..." │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
? for shortcuts
**it doesent work tried to ay invalid still and logs me out
/backin endless loop
nvalid API key · Fix external API key
⚠️
Error
🔐 Login Required
Your Claude API key is invalid or expired.
A terminal has been opened - please run the login process there.
After logging in, come back to this chat to continue.
Plan First
Thinking Mode
Type your message to Claude Code...
Model
MCP
/
@
Expected Behavior
To be able to use the feature that I am paying for when I have valid oath token, valid api etc makes no sense
Actual Behavior
<!-- What actually happened -->
Additional Context
<img width="1637" height="981" alt="Image" src="https://github.com/user-attachments/assets/6df8cc5a-3759-46cf-ae02-32c03b258909" />
<img width="1185" height="911" alt="Image" src="https://github.com/user-attachments/assets/640b6055-baf5-431f-a41c-dafc281d4dcb" />
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗