[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

  1. Install VSCode extension
  2. Try to login
  3. 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_

View original on GitHub ↗

37 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/10415
  2. https://github.com/anthropics/claude-code/issues/12105
  3. https://github.com/anthropics/claude-code/issues/1676

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

senikiti · 7 months ago

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.

sp-rdev · 7 months ago

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!

NxsHbb · 6 months ago

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.

tocttou · 6 months ago

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:

2025-12-21 01:04:16.738 [info] Starting OAuth login flow: method=claudeai
2025-12-21 01:04:33.838 [info] Received message from webview: {"type":"request","requestId":"___","request":{"type":"submit_oauth_code","code":"___"}}
2025-12-21 01:04:33.839 [info] Handling manual auth code input
2025-12-21 01:04:33.856 [info] Received message from webview: {"type":"request","requestId":"___","request":{"type":"submit_oauth_code","code":"___"}}
2025-12-21 01:04:33.856 [info] Handling manual auth code input
2025-12-21 01:04:35.873 [error] Failed to fetch subscription: AxiosError: Request failed with status code 401
2025-12-21 01:04:36.021 [info] Saving OAuth tokens to secure storage
2025-12-21 01:04:36.021 [info] Login successful
2025-12-21 01:04:36.021 [info] Getting authentication status
2025-12-21 01:04:36.021 [info] Keychain read failed, trying file fallback
2025-12-21 01:04:36.021 [info] OAuth tokens found in secure storage
2025-12-21 01:04:36.021 [info] Auth status: method=claudeai
2025-12-21 01:04:36.021 [info] Closing Claude on channel: ___
thatgoofycool · 6 months ago

fix this goddamn bug already jesus christ

StanProg · 6 months ago

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"

  • Chat opens and as soon as I type something I got redirected to the UI where I have to choose "Claude.ai Subscription"/"Anthropic Console" or "Bedtock, Foundry or Vertex".

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".

026-01-14 16:36:12.828 [info] Received message from webview: {"type":"request","requestId":"a1mrip9jji8","request":{"type":"login","method":"console"}}
2026-01-14 16:36:12.829 [info] Starting OAuth login flow: method=console
2026-01-14 16:36:22.832 [error] Failed to fetch subscription: AxiosError: Request failed with status code 401
2026-01-14 16:36:22.841 [info] Creating API key for Console user
2026-01-14 16:36:24.106 [info] Saving API key
2026-01-14 16:36:24.106 [info] API key saved to config file
2026-01-14 16:36:24.111 [info] Login successful
2026-01-14 16:36:24.112 [info] Getting authentication status
2026-01-14 16:36:24.112 [info] API key found in config file
2026-01-14 16:36:24.114 [info] Auth status: method=api-key
2026-01-14 16:36:24.116 [info] Closing Claude on channel: md944wbogh
2026-01-14 16:36:24.180 [info] From claude: 2026-01-14T14:36:24.180Z [DEBUG] Getting matching hook commands for SessionEnd with query: other
2026-01-14T14:36:24.180Z [DEBUG] Found 0 hook matchers in settings

2026-01-14 16:36:24.181 [info] From claude: 2026-01-14T14:36:24.181Z [DEBUG] Matched 0 unique hooks for query "other" (0 before deduplication)

2026-01-14 16:36:24.190 [info] From claude: 2026-01-14T14:36:24.190Z [DEBUG] Cleaned up session snapshot: C:\Users\StanProg\.claude\shell-snapshots\snapshot-bash-1768400460437-5wajw2.sh

2026-01-14 16:36:24.190 [info] From claude: 2026-01-14T14:36:24.191Z [DEBUG] LSP server manager shut down successfully

2026-01-14 16:36:24.196 [info] From claude: 2026-01-14T14:36:24.196Z [DEBUG] BigQuery metrics exporter flush complete
2026-01-14T14:36:24.196Z [DEBUG] BigQuery metrics exporter flush complete
2026-01-14T14:36:24.196Z [DEBUG] BigQuery metrics exporter shutdown complete

2026-01-14 16:36:24.594 [info] Closing Claude on channel: md944wbogh
2026-01-14 16:36:24.594 [error] Error from Claude (on channel md944wbogh): Error: Claude Code process exited with code 1

After I restart VS Code among the log messages I get:

2026-01-14T14:47:40.956Z [ERROR] "AbortError: AbortError: The operation was aborted.\n    at unknown\n    at abortChildProcess (node:child_process:947:42)\n    at onAbortListener2 (node:child_process:35:24)\n    at abort (unknown)\n    at <anonymous> (B:/~BUN/root/claude.exe:5108:6169)"
2026-01-14 16:47:41.135 [info] From claude: 2026-01-14T14:47:41.134Z [ERROR] "Error: Error: Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the \"X-Api-Key\" or \"Authorization\" headers to be explicitly omitted\n    at validateHeaders (B:/~BUN/root/claude.exe:855:1013)\n    at buildHeaders (B:/~BUN/root/claude.exe:855:8517)\n    at async buildRequest (B:/~BUN/root/claude.exe:855:7583)\n    at async makeRequest (B:/~BUN/root/claude.exe:855:3411)\n    at processTicksAndRejections (native:7:39)"
2026-01-14 16:47:41.196 [info] From claude: 2026-01-14T14:47:41.197Z [DEBUG] countTokensWithFallback: haiku fallback failed: Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted
satsanthony · 5 months ago

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?

StanProg · 5 months ago
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 | iex on PowerShell + adding it to Path.

satsanthony · 5 months ago

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" />

Leverpastej · 5 months ago
> 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 | iex on PowerShell + adding it to Path.

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" />

Leverpastej · 5 months ago
> > 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 | iex on PowerShell + adding it to Path. Sorry, but this didn't resolve it for me. I install went good (?) <img alt="Image" width="1103" height="364" src="https://private-user-images.githubusercontent.com/20172244/537295023-78534322-eb4c-4289-81ab-1027ec8a6ed0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg3NDg1MDcsIm5iZiI6MTc2ODc0ODIwNywicGF0aCI6Ii8yMDE3MjI0NC81MzcyOTUwMjMtNzg1MzQzMjItZWI0Yy00Mjg5LTgxYWItMTAyN2VjOGE2ZWQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTE4VDE0NTY0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI0NTMxNmU4YjkzOWUxZDI5MzdjOWZmYzAyYmRmMWE5NDdjNjRmZjBkZTFjZmU2MzBiOWViYzQ5YzkzOWRjOTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.CwXiwvZpmjuXZvIjEKRCyyQhwCDw1wlzV1h6ZIYswOo"> And this is my env. user Path <img alt="Image" width="653" height="165" src="https://private-user-images.githubusercontent.com/20172244/537294916-cf7e2b7f-71ed-420a-9b94-4d413651899d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg3NDg1MDcsIm5iZiI6MTc2ODc0ODIwNywicGF0aCI6Ii8yMDE3MjI0NC81MzcyOTQ5MTYtY2Y3ZTJiN2YtNzFlZC00MjBhLTliOTQtNGQ0MTM2NTE4OTlkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTE4VDE0NTY0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlNGVkYWM3ZjYxYzljNWY5ZDI4YWEwMWRjNzlkMmEyMTg4MjY4NDdlNGViYWUyNjNkY2MwZTZkNzY0NDZlNjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.dtFjFT3_CeelMIhxFETu9zK-dcEZtQk9bYKKkBJBlak">

Hi,

I just got it to work.
I ran irm https://claude.ai/install.ps1 | iex in 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" />

satsanthony · 5 months ago

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" />

whhong-research · 5 months ago
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 alt="Image" width="820" height="498" src="https://private-user-images.githubusercontent.com/45216642/537294816-eab9cb57-6e04-4f57-b32f-804d2fc37dfc.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg4NDM3MjMsIm5iZiI6MTc2ODg0MzQyMywicGF0aCI6Ii80NTIxNjY0Mi81MzcyOTQ4MTYtZWFiOWNiNTctNmUwNC00ZjU3LWIzMmYtODA0ZDJmYzM3ZGZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTE5VDE3MjM0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ1MzA2MWQ4ZWFkZTdjMDAyYTViYmU0OWQxNzViNGM0MjJiMmY5YWZkZDc0NmEwMmIxMmEzMTYxOTE5YTMxN2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.KkTY9-aWppk5J5gGqyiQG5Mb776Q8D-hAd9VRgbsQ8s">

@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?

satsanthony · 5 months ago

@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.

ddosanjh · 5 months ago

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.

Prokopevs · 5 months ago

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.org

Run it:

  • in normal terminal
  • in VS Code integrated terminal

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.

whhong-research · 5 months ago

@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.)

pwrgh2 · 5 months ago
> 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 | iex on PowerShell + adding it to Path.

!!!!! THANK YOU This fixed the issue for me.
(installing Claude Code for Windows via irm https://claude.ai/install.ps1 | iex on PowerShell + adding it to Path.)
I think installing CLI with irm from terminal configures windows and configuration files correctly.

gbazad93 · 5 months ago
> > > 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 | iex on PowerShell + adding it to Path. > > > Sorry, but this didn't resolve it for me. I install went good (?) > <img alt="Image" width="1103" height="364" src="https://private-user-images.githubusercontent.com/20172244/537295023-78534322-eb4c-4289-81ab-1027ec8a6ed0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg3NDg1MDcsIm5iZiI6MTc2ODc0ODIwNywicGF0aCI6Ii8yMDE3MjI0NC81MzcyOTUwMjMtNzg1MzQzMjItZWI0Yy00Mjg5LTgxYWItMTAyN2VjOGE2ZWQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTE4VDE0NTY0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI0NTMxNmU4YjkzOWUxZDI5MzdjOWZmYzAyYmRmMWE5NDdjNjRmZjBkZTFjZmU2MzBiOWViYzQ5YzkzOWRjOTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.CwXiwvZpmjuXZvIjEKRCyyQhwCDw1wlzV1h6ZIYswOo"> > And this is my env. user Path > <img alt="Image" width="653" height="165" src="https://private-user-images.githubusercontent.com/20172244/537294916-cf7e2b7f-71ed-420a-9b94-4d413651899d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg3NDg1MDcsIm5iZiI6MTc2ODc0ODIwNywicGF0aCI6Ii8yMDE3MjI0NC81MzcyOTQ5MTYtY2Y3ZTJiN2YtNzFlZC00MjBhLTliOTQtNGQ0MTM2NTE4OTlkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTE4VDE0NTY0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlNGVkYWM3ZjYxYzljNWY5ZDI4YWEwMWRjNzlkMmEyMTg4MjY4NDdlNGViYWUyNjNkY2MwZTZkNzY0NDZlNjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.dtFjFT3_CeelMIhxFETu9zK-dcEZtQk9bYKKkBJBlak"> Hi, I just got it to work. I ran irm https://claude.ai/install.ps1 | iex in 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 alt="Image" width="2000" height="1806" src="https://private-user-images.githubusercontent.com/20172244/537295322-15199b32-6e6c-485c-a8f0-cf18cf847cb0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjkzNTc1NTQsIm5iZiI6MTc2OTM1NzI1NCwicGF0aCI6Ii8yMDE3MjI0NC81MzcyOTUzMjItMTUxOTliMzItNmU2Yy00ODVjLWE4ZjAtY2YxOGNmODQ3Y2IwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI1VDE2MDczNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlOGI4ODNmYmMxNjI1MWZmMWI2ODBlN2I0YTc2ZmRmNjYzN2ExMDRjN2M5NzE3ZTZmZjUzMWI5MGM1NGE3ZWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.fenSpsCATtxO196EULpo4_CQbZstz8M5eoCTj83OerE">

Thank you! Finally this worked

teddav · 5 months ago

I got it to work by:

  • uninstall claude extension in vs code (and restart vs code)
  • delete ~/.claude
  • reinstall extension and /login
adrianoted · 5 months ago

Hello, 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.

ivo-1 · 5 months ago

Reverting to 2.0.70 on macOS worked for me. Inspired by this comment: https://github.com/anthropics/claude-code/issues/16313#issuecomment-3717163296

avatorl · 5 months ago
> > 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 | iex on PowerShell + adding it to Path. !!!!! THANK YOU This fixed the issue for me. (installing Claude Code for Windows via irm https://claude.ai/install.ps1 | iex on PowerShell + adding it to Path.) I think installing CLI with irm from terminal configures windows and configuration files correctly.

Thanks! That worked for me as well.

PowerShell:
irm https://claude.ai/install.ps1 | iex

Then 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).

annis-souames · 5 months ago

I have same issue on vs code fresh install in Debian 13 with claude extension

gloriathepenguin · 5 months ago

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

annis-souames · 5 months ago

@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.

gcliddellSoton · 4 months ago

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

challs · 4 months ago

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.

StubbornDeer · 4 months ago
> > > 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 | iex on PowerShell + adding it to Path. > > > !!!!! THANK YOU This fixed the issue for me. (installing Claude Code for Windows via irm https://claude.ai/install.ps1 | iex on PowerShell + adding it to Path.) I think installing CLI with irm from terminal configures windows and configuration files correctly. Thanks! That worked for me as well. PowerShell: irm https://claude.ai/install.ps1 | iex Then 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).

OMG it helped me, thanks!

avatorl · 4 months ago
Am I the only one that sees a problem in a 'fix' that consists of executing some random powershell script from the interwebs? 🤣

Random script? That's an official Claude Code installer.

https://github.com/anthropics/claude-code

dcedgren · 3 months ago
> > > > 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 | iex on PowerShell + adding it to Path. > > > > > > !!!!! THANK YOU This fixed the issue for me. (installing Claude Code for Windows via irm https://claude.ai/install.ps1 | iex on PowerShell + adding it to Path.) I think installing CLI with irm from terminal configures windows and configuration files correctly. > > > Thanks! That worked for me as well. > PowerShell: irm https://claude.ai/install.ps1 | iex > Then 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). OMG it helped me, thanks!

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.

chbotla · 3 months ago

Switch to terminal mode and that works fine for me. If needed, you can switch back to chat mode later.

srinivassathyan · 3 months ago

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..

wardboumans · 25 days ago

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.

JamieGee123 · 17 days ago

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

david-mills · 4 days ago

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."