Skip to content

[BUG] Login on Claude Code VSCode extension fails with 400 error but works fine in terminal #13323

Description

@kianooshm

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

I'm on Ubuntu 24. I can run claude in the terminal and login successfully: when I enter /login, I am taken to a page to authorize, and then the CLI automatically logs in (no need to copy paste any code).

When I do the same in the sidebar in VSCode, I get "Token exchange failed: Request failed with status code 400" along with a link to "Troubleshooting resources" which basically provides no information but to file a bug - which I am doing!

In the sidebar, when I go down the copy-paste path (I disallow VSCode to open the link automatically but instead copy-paste the code into the browser), I get an authorization code, which then I paste into the box and click Continue. Then the chat tab in the sidebar hangs forever. If I open a new chat tab, it's unauthenticated (and a login attempt results in that tab hanging too).

What am I missing?

What Should Happen?

I already paid. I should be able to just log in! It's the most basic functionality.

Error Messages/Logs

Token exchange failed: Request failed with status code 400

Steps to Reproduce

  1. Install VSCode extension anthropic.claude-code.

  2. Open a Claude chat tab in the sidebar and enter /login; allow VSCode to open the link in Chrome.

That's it.

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.0.60 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:autharea:ideautocloseIssue will be closed automaticallybugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions