[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:
- Provide Authentication Code input field (like CLI does), OR
- Respect API keys in config.json when user wants API billing
Error Messages/Logs
Steps to Reproduce
- Login via "Sign in with Claude Pro" (OAuth)
- Add API key to
~/.claude/config.json - Restart VSCode
- 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_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗