[BUG] Claude Code integration with VS Code not working on Windows
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: 1.0.2 (Claude Code)
- Operating System: Windows 10
- Terminal: Ubuntu WSL terminal
Bug Description
Claude isn't integrated with Visual Studio Code just like it doesn't with PyCharm. The impression I've gotten is that Claude will install it's extension, since the installation instructions just says: "Run claude - the extension will auto-install". I've search the VS Code marketplace and there isn't extension there from Anthropic to install manually. I asked Claude and it hallucinated a marketplace link that was a 404.
Steps to Reproduce
- In Ubuntu WSL terminal: sudo npm install -g @anthropic-ai/claude-code
- In Ubuntu WSL terminal: claude config set -g autoUpdaterStatus disabled
- In Visual Studio Code Ubuntu WSL terminal: claude
- /ide
Expected Behavior
Says something about being integrated with Visual Studio Code.
Actual Behavior
This output:
Select IDE
Connect to an IDE for integrated development features.
No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.
Additional Context
I've attempted to contact support, but haven't been emailed yet. I also tried installing PyCharm, your plug-in for it, and then using Claude Code from the Ubuntu WSL terminal there. That didn't work and lead me to the existing issue about that not working. Couldn't find an existing issue for VS Code not working on Windows, so opened this.
42 Comments
Found the same issue @JoshHeitzman reported.
My environment
VS Code version:
Version: 1.100.2 (user setup)
Commit: 848b80aeb52026648a8ff9f7c45a9b0a80641e2e
Date: 2025-05-14T21:47:40.416Z
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.19045
Ubuntu in WSL2:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
WSL version:
WSL version: 2.4.13.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.5854
Same issue here, I use Claude Code via WSL2 on Windows 11, installed the extension manually. When I launch claude and /ide, it doesn't detect it.
Just locate the folder where Claude Code is installed on your WSL, do a search for @anthropic-ai in your Linux on windows file explorer and you'll find the extension in a path similar to this one:
"\\wsl.localhost\Ubuntu-24.04\home\[linuxUser]\.nvm\versions\node\v22.16.0\lib\node_modules\@anthropic-ai\claude-code\vendor\claude-code.vsix"
Just use the command code --install-extension "\wsl.localhost\Ubuntu-24.04\home\[linuxUser]\.nvm\versions\node\v22.16.0\lib\node_modules\@anthropic-ai\claude-code\vendor\claude-code.vsix"
@idaliopessoa I found that file at: ./usr/local/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix
the install appeared to be successful:
/$ code --install-extension ./usr/local/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix
Installing extensions...
Extension 'claude-code.vsix' was successfully installed.
Fired up VS Code (from Windows) again, switched to the extension tab, but there wasn't a new extension in the list. Still getting the same "No available IDEs detected" from /ide when running claude in the Ubuntu WSL terminal in VS Code.
I went to the Ubuntu WSL terminal at the Windows level (i.e. not in VS Code) and used code to start VS Code from there. Opened a new terminal (called bash in this case not Ubuntu) and started claude. This time /ide was able to find and connect to VS Code.
Unfortunately VS Code started from WSL is useless for working on workspace setup for doing development on actual Windows.
Just followed what @idaliopessoa suggested and it works. Thank you so much.
Here are what I did.
In WSL2:
Find a path of your
claude-code.vsixmy is under .nvm folder because I use NVM and node 22.16.0.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsixIn WSL (Windows Terminal or other terminals), install the extension with the following command:
Then open VS Code, launch integrated terminal:
Then in VS Code integrated terminal:
!Image
Have same issue
Enviorment:
Version: 0.50.7 (user setup)
VSCode Version: 1.96.2
Commit: 02270c8441bdc4b2fdbc30e6f470a589ec78d600
Date: 2025-05-24T18:32:30.918Z
Electron: 34.3.4
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.22631
The solution above works, but it makes Claude Code unusable in many cases.
These steps seem to work for me...
><in lower left and selectConnect to WSL.claudefrom project dir./ideshows Windsurf.Note: First time I ran claude, I think I got prompted or it auto installed the claude code extension in Windsurf.
@igorkofman solution above (https://github.com/anthropics/claude-code/issues/1276#issuecomment-2906940003) stops working for Claude Code v1.0.5
After downgrading to 1.0.3, it may be used, but Claude automatically updates it to 1.0.5, so it's not working again :)
IDE: Cursor latest stable
Claude code extension installed v1.0.5
Enviroment:
Version: 0.50.7 (user setup)
VSCode Version: 1.96.2
Date: 2025-05-24T18:32:30.918Z
Electron: 34.3.4
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.22631
!Image
!Image
Thanks for the report @CoderF3ff - we should have a fix out today (1.0.6)
@igorkofman it works, thank you a lot!
Thank you, my friend. This method has proven to work the best.
I am using 1.0.6 and having issues on Mac using
nvm.I need to manually install as follows:
It reports the connection but still indicates a problem:
<img width="564" alt="Image" src="https://github.com/user-attachments/assets/1569b8ed-f4b7-44ab-a3aa-317261a2a542" />
I'm using 1.0.6 on Mac, VSCode, and this is what helped (partially based on previous answers):
The same issue, I spent a few hours trying to figure this out, and ironically ended up solving it with help from Sonnet itself. I was getting the same error in my IDE terminal:
Weird thing was, if I ran Claude Code in a separate WSL terminal instead of Jetbrains Rider's one, while also having my IDE open, it would detect Rider. I could even select it, and it said the connection was successful, but still showed pink “IDE disconnected” in status message.
Here’s what ended up fixing it for me:
I added a
.wslconfigfile in%UserProfile%with this content:But that caused another issue - my Ubuntu WSL instance no longer had the
eth0interface. Thankfully I found a helpful comment by arslantu that suggested a registry tweak:Set the value to
32(Decimal)After a reboot, everything worked - Rider showed up under /ide, the status was fine (no more "IDE disconnected"), and it now works both inside and outside the IDE's terminal.
And of course, sometimes it still doesn't detect the IDE right away, even after all that, so the classic "restart the IDE a few times" trick can actually help.
Hope this helps someone!
Great, let’s test it out. I spent two full days setting everything up — had some issues with the Android emulator. Initially, I was launching the IDE through WSL and later configured the emulator separately, which finally worked. But then my system started lagging badly, even though it’s a powerful machine. So I decided to install Ubuntu, but it felt too heavy. Eventually, I switched to Linux Mint — and I’m really satisfied. It’s not Windows, of course, but now I can work smoothly with Claude Code, the IDE, and the emulator all running without issues.
We've shipped improvements to WSL support and would love to hear if its working better for folks with the latest version of claude (you may have to restart the extension after the new version of claude installs the latest extension).
@igorkofman At this point is it expected that one can start Visual Studio Code from Windows, open the Ubuntu (or whatever distribution one installed for WSL) terminal, type in claude and expect /ide to connect with VS Code? Or is it only expected to work if one opens a WSL terminal from Windows, types in code to start VS Code from WSL, and use the terminal in VS Code to start Claude?
@igorkofman v1.0.11 is integrating with VS Code more poorly then v1.0.2. Back on May 24 (details in this thread) I was at least able to get the integration working when VS Code was started via the code command in the Ubuntu WSL prompt and then claude was started in the Ubuntu WSL terminal in VS Code. After updating claude via npm I manually installed claude's .vsix again. Now I'm getting no ides detected after several restarts of VS Code.
When you launch VS Code regularly in Windows, are you using the
><in the lower left to connect to the WSL? With that connected (I use ubuntu), launching claude code from another WSL terminal window, or the terminal inside windsurf (should be same as VS Code), it connects fine. I've never had to manually install the extension... when both windsurf/vscode and claude code are both running on WSL, the communication works and extension auto installs if not there.@ben-vargas Thanks! I was not using that. But using that relatively obscure GUI element relaunched VS Code in what seems to be a proper WSL mode. It was nearly two weeks ago when I last tried this. At the time starting VS Code from an Ubuntu WSL prompt via the code command seemed to start VS Code in a proper WSL mode, but its definitely not doing that today. Now I'm seeing the same thing you are in that claude is able to find the WSL VS Code when it run in a WSL terminal regardless of whether the terminal was started directly on Windows or in VS Code.
Doesn't feel like there has been any improvement since 1.0.2 though. Still get nothing when running a Windows mode VS Code.
@JoshHeitzman - Yeah, I found that last week and commented in the issue thread above... like you I found that when using
windsurffrom a WSL terminal window to launch windsurf, it wasn't launching/connecting correctly, as if it was actually launching not connected to the WSL (pretty much confirmed because open folder shows windows file structure, not the linux WSL paths).By far the most consistent method for me has been to make sure windsurf (or cursor, or vsc) is running in WSL mode (connection?) with that little obscure icon, then claude code in WSL seems to have no problem integrating. Agree, still not ideal because I haven't seen this requirement/need documented anywhere in the docs, so people don't know about it.
I saw a lot of tool errors from Opus when I first started using it while connected to VS Code in WSL. The errors were not specific enough to say if they were IDE specific tools, but Opus was stuck in a loop until I told it couple of times that it was stuck and that tool wasn't going to work for it. It generally stopped having tool errors after that and definitely didn't get stuck in a loop of tool errors again (today at least). When I switch to Sonnet I see some occasional tool error there too, but not a sticky loop. Tomorrow I'll try things in a WSL prompt without being connected to VS Code and see if similar issues occur.
We've identified the WSL2.0 issues and will have a fix shortly
FYI for Arch Linux installation via the AUR the plugin is available at:
install via:
Then run
/idein vscode terminalThank you @ben-vargas
It worked for me on VS Code
Just last night something force my vscode window loading and then the claude button on the top right (tab option) has disappeared. /ide says its connected to vscode however the button has gone.
What worked for me was properly adding Cursor’s Windows path to my ~/.bashrc.
I added the following line:
export PATH="$PATH:/mnt/c/Users/{user}/AppData/Local/Programs/cursor/resources/app/bin"
After that, I opened Cursor from the Windows Terminal inside WSL (Ubuntu, in my case), then launched Claude — and voilà, it worked!
It’s actually a mix of different solutions from this thread, and in the end, it's fairly simple once you understand the reasoning behind each step.
Bonus: Claude now even works when I open Cursor directly from Windows — no need to launch it through the terminal anymore.
Going into WSL with VS code is not an option for my .NET project as I need to build and run on Windows. Is there any plan to make claude code work with VS code without running WSL?
minor addition: if you use profiles in VSCode you might want to add
... --profile "PROFILENAME"to the command above, otherwise it would be added toDefaultprofile only. Took me some time to figure this out...This issue is still present on MacOS and Claude Code for VSCode version 10.0.35. None of the above mentioned fixes work.
Added it to bashrc but still does not work. The issue is far from solved.
<img width="1095" height="296" alt="Image" src="https://github.com/user-attachments/assets/5b78c6c0-4c3b-4bc4-9327-6697ecd42e84" />
Make sure to install the WSL extension for VS Code at https://code.visualstudio.com/docs/remote/wsl-tutorial. After installing, reopen VS Code from the WSL terminal, and it will work properly. I faced the same issue, and this solution resolved it for me. Additionally, confirm that you see [WSL:Ubuntu] in the VS Code search bar and the WSL icon on the bottom left.
<img width="287" height="46" alt="Image" src="https://github.com/user-attachments/assets/8fa00a67-5e05-4287-b83d-34e5bfd8c873" />
<img width="276" height="95" alt="Image" src="https://github.com/user-attachments/assets/28e5db83-21a4-4ff1-bbc6-3aa34904a593" />
You shouldn't have to do that. Running some projects in Linux does not work - it breaks many .NET ones for example.
Anthropic should just coordinate better between the teams. The Jetbrains CC plugin works without issues under Windows, resolving all the correct paths. They should copy whatever they have done there to the VS Code one.
Just heads up that Claude Code now works without WSL on Windows. Recommend giving that a try if you're having issues with it via WSL.
@igorkofman claude code in
git bash on windowsstill seems not work with VSCode integrationanother people faced the same problem
https://github.com/anthropics/claude-code/issues/5887
Running vs code as admin seems to work
I found a solution, just type
VSCODE_PID= VSCODE_CWD= TERM_PROGRAM= command claudein your VSCode integrated terminal (I use git-bash.exe)Or if you want to use the alias/function, you can just do it in your bashrc / zshrc like this:
enjoy
<img width="1150" height="831" alt="Image" src="https://github.com/user-attachments/assets/9b07f08a-f521-4c03-b991-ea59a71be00c" />
cursorcommand in PATH.CLAUDE_CONFIG_DIR.claude.exeexists and is in PATH.this works, but still PITA. When I click the Claude icon built into vscode it should know enough to know I am in vscode. ffs.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.