[BUG][wsl2][Claude-code] doesn't recognizes ide's working directory correctly
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ x] Other: <claude code>
- Claude CLI version: <1.0.5>
- Operating System: <windows 11, wsl2 >
- Terminal: <default terminal from ubuntu 24 lts isnide wsl2 integration>
Bug Description
I have updated Claude-code from 1.0.4 to 1.0.5 and now it doesn't recognizes ide's working directory correctly (either intelij, or vscode) even when opened inside them via terminal or via ctrl+esc or clicking the widget; thus it does not apply the ide integration correctly as it doesn't correctly sense that they are open
Steps to Reproduce
- Open ide
- Run claude in terminal
- Claude conencts but ide is not connected; Message when using the /ide command : 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. │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Esc to exit
Expected Behavior
Connect to the ide; use the file reference automatically, git diff in the ide etc.
Actual Behavior
Works just in the terminal, unable to see the correct wkd path , adds the //wsl/username to the perceived working directory of the ide (/home/username/folder_of_interest)
Additional Context
This is definitely a regression, as 1.0.4 version was integrating correctly with both ide's ; When running Intelij Idea actually and claude in terminal separately in the home directory, it senses that intelij is open:
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. │
│ │
│ Found 1 other running IDE(s). However, their workspace/project directories do not match the current cwd. │
│ │
│ • IntelliJ IDEA: //wsl.localhost/Ubuntu/home/username/project_directory
-> adds the //wsl.localhost/Ubuntu prefix to the path where the ide is open isntead of considering the cwd of the ide /home/username/project_directory ; that is 1000% the issue, might be a change in aliases etc. ;
This doesn't happen for vs code unfortunately, but it doesn't connect to vs code either
18 Comments
Also experiencing the same thing with VS Code on Windows with WSL2.
solved for vs code by 1.0.6 release, Intelij still doesn't get detected
Possible duplicate: https://github.com/anthropics/claude-code/issues/1390
Same here with Claude 1.0.51 and Cursor 1.2.5 . But doesn't recognize that its in wsl
Same for 1.0.53 Claude with 1.102.0 VSCode
Also having the same issue. Vscode was opened using a workspace file:
~/projects/oc/.vscode.workspace
In the workspace file there is couple of paths:
When running the /ide command in claude I get those those paths:
Opening not the workspace but using "Open folder" in vsocde solved the issue but it looks like regression. It was working quite fine just yesterday.
Also happening on MacOS. "Open Folder" instead of using "Open Recent" or "GPM" to open the project does seem to work around the issue (sometimes)
@iterate-nick thanks. CC can't match softlinked folders. "Open Folder" with full path helped!
In Cursor and I suspect VS Code on MacOS, you need to close all of your terminal windows and File/Open Folder... I don't think the order matters but you must do both.
This method works. You can't had any terminal opened when the window reload.
If you reload like this way which a terminal had open, can't connect to claude code extension:
<img width="1920" height="1071" alt="Image" src="https://github.com/user-attachments/assets/fb27d09e-62e4-4d34-b27f-2145e7ee4608" />
But like following, first kill all terminal, the reload, the extension works:
<img width="1920" height="1079" alt="Image" src="https://github.com/user-attachments/assets/322ede97-2c55-408f-852c-6b62bb68e03b" />
I tried relaunch terminal and fixed automatically.
<img width="561" height="469" alt="Image" src="https://github.com/user-attachments/assets/2f3bd423-d085-4145-a819-8157372a6f43" />
Workaround for VSCode users -> Open the project from WSL using the
codecommand. This is how I was able to get Claude (WSL installation) to recognize my editor.Same problem! Nothing helps. cwd shows the same folder in Claude but says it's a different folder. I'm using remote VS Code from macOS to Ubuntu.
UPDATE: It helped to downgrade to 1.0.62
Fyi: I used Git Bash instead of PowerShell and was able to connect to WebStorm
Claude Plugin: 0.1.12-beta
Claude Code: 2.0.55
WebStorm: 2025.2.5
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.
For whoever is facing this issue, I was able to workaround it in macOS by opening vscode from the terminal and then claude. Not sure if it works on WSL tho:
code . && claude --dangerously-skip-permissionsThis 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.