[BUG] Unable to log into vscode extension with sandboxed vscode (web) in 2.0.1

Resolved 💬 2 comments Opened Sep 30, 2025 by lucidNTR Closed Sep 30, 2025

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?

Claude Code for VS Code Version
2.0.1 Last Updated 2025-09-30, 11:46:52
breaks completely the login flow. when logging in with the console login button the redirect goes to some localhost with weird port instead of showing the code that i can paste into the vscode extension. (http://localhost:40057/callback?code=3WlCE3t_REDACTED_3ZE&state=KSnTm_REDACTRE_QEoQ)

as vscode and claude code do not run on the same vm as the browser that does login, this port cannot be reachable, also it seems to be a random port so you cant expect users to forward random ports on their dev boxes. in addition when trying to curl the url on the machine that is running claude code the error appears: invalid state

What Should Happen?

redirect to a domain on https://console.anthropic.com that just shows the code i can copy paste AND alternative ability to just use the anthropic api key i have in my env vars

Error Messages/Logs

Steps to Reproduce

use sandboxed vscode or vscode web in a docker container

  • install latest claude code extension
  • click login with anthropic console
  • click copy button to copy the login url.
  • paste the login url in a different OS context that does not have access to the localhost of the vscode + claude code. eg in the host os browser or on a different machine. or in a different sandbox isolation
  • whitnes redirect to an unreachable localhost port instead of showing the code

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.1

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 2 comments on GitHub. Read the full discussion on GitHub ↗