[BUG] VS Code extension (official) not recognizing pro plan credentials on login - 400 error
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?
Bug Description:
VS Code extension authentication succeeds but API calls fail with credential error
Steps to Reproduce:
- Install Claude Code VS Code extension (anthropic.claude-code)
- Sign in using "claude.ai subscription" option with Claude Code Pro account
- OAuth flow completes successfully
- Attempt to send a message in the extension
- Receive error: "This credential is only authorized for use with Claude Code and cannot be
used for other API requests"
Error Message:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This
credential is only authorized for use with Claude Code and cannot be used for other API
requests."}
Environment:
- VS Code Extension Version: [check your version]
- VS Code Version: [your version]
- OS: macOS 14.6.0
- Claude Code CLI Version: 2.0.42 (working fine)
Notes:
- This worked perfectly for 2 months until November 16, 2025
- CLI authentication works fine with same Pro account
- Only VS Code extension is affected
What Should Happen?
I should be able to authenticate as I have done for the last three months when I log in via the official Claude Code extension in VS Code. It just won't log in and it gives me that error.
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This credential is only authorized for use with Claude Code and cannot be used for other API requests."},"request_id":"req_011CVCM7uDirhDmU17TRaX3z"}
Steps to Reproduce
Steps to Reproduce
- Have an active Claude Code Pro subscription
- Install the Claude Code VS Code extension from the
marketplace (anthropic.claude-code)
- Open VS Code and click the Claude Code (Spark) icon in
the sidebar
- Click "Sign in"
- Select "Sign into claude.ai subscription" from the login
options
- Complete the OAuth flow in the browser (authorize
access)
- Verify the browser shows success message ("build
something great together")
- Return to VS Code - the extension should show as
authenticated
- Open the Claude Code chat panel in VS Code
- Type any simple prompt (e.g., "Hello, can you help
me?")
- Press Enter to send
Expected Result: Claude should respond to the message
Actual Result: API Error occurs:
API Error: 400 {"type":"error","error":{"type":"invalid_req
uest_error","message":"This credential is only authorized
for use with Claude Code and cannot be used for other API
requests."},"request_id":"req_011CVCM7uDirhDmU17TRaX3z"}
## Additional Context
- This issue started on November 16, 2025
- The same Pro account works perfectly fine in Claude Code
CLI (version 2.0.42)
- The extension was working correctly for 2 months prior to
this date
- OAuth authentication flow completes successfully - the
error only occurs when making API calls
- No code files are needed to reproduce - this is purely an
authentication/API issue
## Environment
- VS Code Extension: Claude Code (anthropic.claude-code)
v[YOUR VERSION - check in Extensions]
- VS Code Version: [YOUR VERSION - Help > About]
- OS: macOS (Darwin 24.6.0)
- Claude Code CLI: 2.0.42 (working correctly)
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.42
Claude Code Version
2.0.42 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
This just started happening today. Everything has been fine for the last two months or three months that I've been using this.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗