[BUG][wsl2][Claude-code] doesn't recognizes ide's working directory correctly

Resolved 💬 18 comments Opened May 29, 2025 by Sebastian-Geocento Closed Jan 29, 2026
💡 Likely answer: A maintainer (sid374, contributor) responded on this thread — see the highlighted reply below.

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

  1. Open ide
  2. Run claude in terminal
  3. 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

View original on GitHub ↗

18 Comments

empz · 1 year ago

Also experiencing the same thing with VS Code on Windows with WSL2.

Sebastian-Geocento · 1 year ago

solved for vs code by 1.0.6 release, Intelij still doesn't get detected

sid374 contributor · 1 year ago
IhsenBouallegue · 1 year ago

Same here with Claude 1.0.51 and Cursor 1.2.5 . But doesn't recognize that its in wsl

│  Found 1 other running IDE(s). However, their workspace/project directories do not match the current cwd.                  │
│                                                                                                                            │
│     • Cursor: c:\<repo>
StephenSHorton · 12 months ago
But doesn't recognize that its in wsl

Same for 1.0.53 Claude with 1.102.0 VSCode

|  Found 1 other running IDE(s). However, their workspace/project directories do not match the current cwd.
|
|    • Visual Studio Code: c:\<repo>
mmsrubar · 12 months ago

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:

{
  "folders": [
    {
      "name": "backend",
      "path": "backend"
    },
    {                                                                                                                        
      "name": "ui",                                                                                                          
      "path": "ui"                                                                                                           
    },
...
}

When running the /ide command in claude I get those those paths:

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.                                      │
│                                                                                                                                                │
│     • Visual Studio Code: /home/user/projects/oc/backend, /home/user/projects/oc/ui, 

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.

iterate-nick · 12 months ago

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)

pannous · 12 months ago

@iterate-nick thanks. CC can't match softlinked folders. "Open Folder" with full path helped!

terris-citizen · 12 months ago

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.

tjx666 · 11 months ago
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.

Seems the vscode resumed terminal can't work well with claude code extension

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

hastalavistababy · 11 months ago

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

StephenSHorton · 11 months ago

Workaround for VSCode users -> Open the project from WSL using the code command. This is how I was able to get Claude (WSL installation) to recognize my editor.

jnpatrick99 · 11 months ago

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

narekntm · 7 months ago

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

github-actions[bot] · 6 months ago

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.

github-actions[bot] · 5 months ago

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.

erick-siordia · 5 months ago

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

github-actions[bot] · 5 months ago

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.