[BUG] I am not able to login through VSCode extension
Open 💬 37 comments Opened Dec 15, 2025 by jmail
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?
Whenever I try to use Claude inside VSCode I get prompt to login.
<img width="1055" height="960" alt="Image" src="https://github.com/user-attachments/assets/c2078e22-efa7-4833-9124-3f0dc9ae3fc3" />
So I proceed with /login ending up with page:
<img width="2189" height="1078" alt="Image" src="https://github.com/user-attachments/assets/877db23f-67a9-4aa9-ad9a-05357c3b7b89" />
I see in api keys list that the key was generated. But when I get back to the VSCode Claude keeps asking me to login
What Should Happen?
Claude should login and be ready to work
Error Messages/Logs
Steps to Reproduce
- Install VSCode extension
- Try to login
- Go over and over again
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.69
Platform
Other
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
37 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I have experienced the same issue. Tried reinstalling the extension and restarting the VSCode. Nothing helped. The only thing that worked was to type / in the chat and then choose Switch Account. It provides the link to login and opens it in a browser. I believe /login should do the same.
Definitely seeing this as an issue. I had it installed and just invalidated my API token overnight and then could not see the option of login as well. Thanks @senikiti for providing a workaround . That helps!
I have same issue. I tried to use the workaround from @senikiti , it takes me to a browser window where the authentication process is completed successfully but it does not redirects to VScode or authenticate vs code.
Facing the same issue trying to login with claude.ai subscription route. Authentication is completed successfully but then nothing happens inside VSCode. Also if I copy the authentication link and generate a code myself and paste it in the login window, the screen just goes blank and nothing happens.
Tried reinstalling VSCode and the extension.
I have claude code CLI installed as well and the login works there just fine :(
Extension output logs:
fix this goddamn bug already jesus christ
I tried the workaround with Switch account of @senikiti, but it did not worked. I use Claude Code for VS Code 2.1.7 (VS Code 1.108.0) on Windows 11 Pro 21H2.
Initial steps:
You’re all set up for Claude Code. You can now close this window"
At https://platform.claude.com/settings/workspaces/default/keys I see my API KEY which I created manually before. In the previous attempts I saw that new API keys are generated, but the result was the same "loop".
After I restart VS Code among the log messages I get:
I am receiving the same error connecting VSCode to the Claude code extension. When I click on Anthropic Console it creates an api key for claude code and then its unable to pass that to my windows 11 OS into VSCode. Same thing happens with Cursor's Claude Code extension. Claude gave up trying to resolve my issue. It is going in circles. Surprised that this is so difficult to enable. How can someone develop new features without fixing basic issue?
What helped in my case is installing Claude Code for Windows via
irm https://claude.ai/install.ps1 | iexon PowerShell + adding it to Path.That's the only way I was able to get it working in the command mode in Terminal for VSCode and Claude. However, the UI screen still shows the need for connection.
<img width="820" height="498" alt="Image" src="https://github.com/user-attachments/assets/eab9cb57-6e04-4f57-b32f-804d2fc37dfc" />
Sorry, but this didn't resolve it for me.
I install went good (?)
<img width="1103" height="364" alt="Image" src="https://github.com/user-attachments/assets/78534322-eb4c-4289-81ab-1027ec8a6ed0" />
And this is my env. user Path
<img width="653" height="165" alt="Image" src="https://github.com/user-attachments/assets/cf7e2b7f-71ed-420a-9b94-4d413651899d" />
Hi,
I just got it to work.
I ran irm
https://claude.ai/install.ps1 | iexin PowerShell. Then I opened the folder and ran the Claude.exe file.This opened Claude in CMD, and I needed to log in again. But after that, I can now chat with Claud in VS Code
<img width="2925" height="1806" alt="Image" src="https://github.com/user-attachments/assets/15199b32-6e6c-485c-a8f0-cf18cf847cb0" />
Yes. That seems to work. After claude code install using the powershell, I had to uninstall the claude code plug-in and restart, re-install the plug-in, restart vs code and this time, it picked it up. So I am all set. Thanks for the tip.
<img width="912" height="576" alt="Image" src="https://github.com/user-attachments/assets/dbb64519-405c-4b1e-98c8-aeea435ac486" />
@satsanthony Hi guys! I met the same problem. Now I could use claude in terminal. But the UI screen still don't work. How do you solve the problem? Just reinstall the claude plug-in?
@whhong-research After claude code install using the powershell (if you scroll up to other post, they have that terminal screen with the install), after that I had to uninstall the claude code plug-in in VSCODE and restart, re-install the plug-in, restart vs code and this time, it picked it up.
I signed up yesterday for the express purpose of test driving the vscode plugin, I closed my account for a refund because of this. It is stunning to me this isn't a wake people up from bed to fix immediately level sev. Someone should escalate this to upper management.
I had the same issue:
Claude worked in terminal but not in the VS Code extension.
Reinstalling the plugin didn’t help.
In my case, the issue was my VPN client (3x-ui).
The terminal was using the VPN, but the VS Code extension and the VS Code integrated terminal were not.
Because of this, the IP used by VS Code was blocked by Claude Code, so authentication and the extension UI didn’t work.
Check:
curl https://api.ipify.orgRun it:
If IPs differ, it’s a VPN routing issue.
Fix (in my case):
Enable TUN mode in the 3x-ui VPN client.
After that, VS Code and terminal used the same IP and Claude Code extension started working immediately.
@Prokopevs Thanks bro! Same issue on my side. I can use the VS Code extension now after switching the VPN to TUN mode. (Honestly I’d already gotten used to doing everything in the terminal lol.)
!!!!! THANK YOU This fixed the issue for me.
(installing Claude Code for Windows via
irm https://claude.ai/install.ps1 | iexon PowerShell + adding it to Path.)I think installing CLI with irm from terminal configures windows and configuration files correctly.
Thank you! Finally this worked
I got it to work by:
~/.claude/loginHello, I had the same problem. I solved it this way: open the terminal (even in vscode) and run
claude.You will be asked to log in. Choose the mode (if you have a pro subscription or API). Continue until the end.
Then you should be able to use the extension.
Reverting to 2.0.70 on macOS worked for me. Inspired by this comment: https://github.com/anthropics/claude-code/issues/16313#issuecomment-3717163296
Thanks! That worked for me as well.
PowerShell:
irm https://claude.ai/install.ps1 | iexThen run the installed claude.exe and login in the terminal (using API key).
After that it starts working in VSCode (it's already properly logged in).
I have same issue on vs code fresh install in Debian 13 with claude extension
Same,I downloaded the Claude code VS Code extension and enabled it on my VPS. I see in api keys list that the key was generated. But when I get back to the VSCode Claude keeps asking me to log in.
Error: Not logged in · Please run /login
@gloriathepenguin I was able to solve it by login in Claude Code CLI in VSC terminal, then closing VSC and opening it again solved the issue for me.
I've also got this error on Linux Red Hat with 'Claude Code for VS Code v2.1.47' and VS code version 1.109. Tried uninstall/reinstall, and deleting ~/.claude after uninstall
I didn't have the Claude code CLI installed. The VS Code extension started working for me (on Debian Linux) after I installed that and logged in using the command line tool.
OMG it helped me, thanks!
Random script? That's an official Claude Code installer.
https://github.com/anthropics/claude-code
The one other step I had to add was after I got the Claude Code CLI running to uninstall and reinstall the extension in VS Code. Then it worked.
Switch to terminal mode and that works fine for me. If needed, you can switch back to chat mode later.
are any of you using amazon bedrock bearer token route? I cant seem to get to get it to work with VC code + Claude code..
Just bought claude, same issue, browser opens, authorize, all seems fine. Not logged in when I check account.
Edit: deleting .claude folder, did the trick. Man the extension is jank compared to Copilot.
You can try this workaround: Uninstall the claude extension and close VSCode. Delete the .claude folder at _C://Users/Username/.claude_. Open VSCode and install the Claude extension again and downgrade it to version 2.0.0. Then open the Claude chat ui, not the terminal. You should see a link that you can copy and paste into your browser manually, copy the code the url gives back to you and paste it into the code input in VSCode Claude chat ui
This resolved this issue for me:
Root cause
Your .claude/settings.json had a PATH override ending in $PATH. Claude Code applies env values literally — it does not expand $PATH or $HOME, so the effective PATH for processes claude spawns dropped ``
bin``. Claude saves login credentials by shelling out to security (which lives only at [security]), so it couldn't find security, doctor reported "macOS Keychain is not writable," and every /login said "Login successful" but silently failed to save the token — which then showed as "Not logged in" once the old token expired.Fix
In [settings.json], replaced the unexpanded variables in env.PATH with explicit paths, restoring the system dirs (and adding ~/.local/bin):
Before: ...:$HOME/.dotnet/tools:...:$PATH
After: ...:/Users/DaveMills/.dotnet/tools:...:/Users/DaveMills/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
claude doctor now reports "No installation issues found."