[BUG] VSCode Extension API Key auth creates new key instead of accepting existing console API keys

Resolved 💬 3 comments Opened Jan 31, 2026 by gphilpott-com Closed Feb 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Claude Code VSCode extension's API key authentication flow forces users to create a new key through an auth page, rather than allowing them to use existing console API keys that are already created and stored (e.g., in environment variables, GitHub secrets, etc.).
Environment:
OS: Linux
Running in: VSCode devcontainer
API key storage: GitHub secrets
Python terminal usage: Works fine with existing key
Additional Context:
The subscription auth flow works correctly
The existing console API key works successfully when called directly from terminal/Python scripts
The issue is specific to the VSCode extension's authentication UX

What Should Happen?

Expected Behavior:
The API key authentication flow should allow users to paste/input their existing console API key, similar to how most API-based tools work.
Actual Behavior:
The auth flow creates a new key instead of accepting an existing one. Users cannot use their pre-existing, already-configured API keys.

Error Messages/Logs

Steps to Reproduce

Have a working console API key already created and stored (e.g., in GitHub secrets, accessed via devcontainer)
Verify the key works (e.g., can successfully call Claude API from terminal/Python)
Attempt to authenticate Claude Code VSCode extension
Choose the "console API key" authentication route
Get redirected to an auth page that creates a NEW key

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Code version: 2.1.27

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Using GitHub Codespaces with web based VS Code editor on Safari

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗