[BUG] VSCode extension throws invalid_request_error despite valid credentials

Resolved 💬 4 comments Opened Feb 11, 2026 by Fjacquette Closed Mar 11, 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?

Despite having a valid Claude subscription, any request in the Claude Code VSCode extension results in:

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_011CY312eY5yjmrQw1Twy9xR"}

Claude Code CLI in the same environment does not have this issue. Logging out and in again and restarting VS Code does not resolve the issue. This appears to be a regression introduced in today's release of 2.1.39 of the extension.

This is NOT a duplicate of a similar issue identified way back in September 2025; it is not intermittent.

What Should Happen?

Claude should respond to the valid request.

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_011CY312eY5yjmrQw1Twy9xR"}

Steps to Reproduce

Open the VSCode Claude Code extension. Enter a command. Weep.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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