[BUG] VSCode Extension ignores API key when OAuth exists

Resolved 💬 3 comments Opened Oct 27, 2025 by AAuhsoj Closed Jan 10, 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?

VSCode extension prioritizes OAuth authentication over API keys in config.json. Users cannot switch from Pro subscription billing to API billing through the UI.

What Should Happen?

"Anthropic Console" login option should either:

  1. Provide Authentication Code input field (like CLI does), OR
  2. Respect API keys in config.json when user wants API billing

Error Messages/Logs

Steps to Reproduce

  1. Login via "Sign in with Claude Pro" (OAuth)
  2. Add API key to ~/.claude/config.json
  3. Restart VSCode
  4. Extension still uses OAuth/Pro subscription billing

Workaround Found Use embedded CLI directly:
node "<extension-path>/resources/claude-code/cli.js" login
Then enter Authentication Code. This enables API billing while keeping VSCode UI

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.27

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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