[BUG] Login on Claude Code VSCode extension fails with 400 error but works fine in terminal
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?
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
- Install VSCode extension
anthropic.claude-code.
- 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_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗