[FEATURE] Login to VSCode sidebar using API Key

Status Fixed / completed
Maintainer reply ✓ Yes — blois
Activity 5 comments · opened Sep 29, 2025 · closed Sep 29, 2025
💡 Likely answer: A maintainer (blois, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

As of Sep 29, Claude Code V2.0.0 was released, which aslo brought the new sidebar experience as part of the VSCode extension. Not everyone has access to an anthropic account, and just like https://github.com/anthropics/claude-code/issues/441, it would be great to sign in to the sidebar using just an API key.

Proposed Solution

The easiest way would be to honor existing keys present in ~/.claude/settings.json (apiKeyHelper or env.ANTHROPIC_API_KEY) or even honor the ANTHROPIC_API_KEY if present.

Alternative Solutions

Right now on a Mac I need to manually edit the password for Claude Code saved in my keychain. It's cumbersome but it works. It would be nice if existing env vars were honored.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

This relates to the VSCode extension, I'm not sure if it uses a different platform to track feature requests.

View original on GitHub ↗

5 Comments

github-actions[bot] · 11 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/1084
  2. https://github.com/anthropics/claude-code/issues/8119
  3. https://github.com/anthropics/claude-code/issues/4733

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

blois collaborator · 11 months ago

Fix is on it's way.

JohnnyMorganz · 11 months ago

Hey @blois, thanks for fixing this for ANTHROPIC_API_KEY. In our setup we use an LLM gateway proxy (https://docs.claude.com/en/docs/claude-code/llm-gateway), so we set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN environment variables and unfortunately are stuck on the login screen on VSCode. Could the check be extended for those variables too?

Thank you very much! Let me know if it's better to create a separate issue for this

mikolaj-matuszny-ext-sonarsource · 11 months ago

Has this been resolved @blois ? I'm facing a similar issue - I only have access to API_KEY in our organization. After updating to the latest version of extension API_KEYS are no longer respected and I'm not able to use the extension - I keep getting asked to login via Subscription or Anthropic console.

github-actions[bot] · 10 months ago

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.