[BUG] Duplicate IntelliJ IDEA detection causing auto-connect IDE failure since version 1.0.57
Issue Title
Duplicate IntelliJ IDEA detection causing auto-connect IDE failure since version 1.0.57
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: 1.0.57+
- Operating System: Windows 10
- Terminal: PowerShell → WSL bash (via
wsl -- bash -ic "claude")
Bug Description
Since claude-code version 1.0.57 and above, IntelliJ IDEA is being detected twice in the IDE selection menu, which causes the auto-connect IDE feature to fail. The IDE selection shows two identical IntelliJ IDEA entries pointing to the same path, and users must manually type and select "/ide" to proceed.
Steps to Reproduce
- Install claude-code version 1.0.57 or higher on Windows 10
- Open IntelliJ IDEA and navigate to the terminal
- Run
wsl -- bash -ic "claude"in the PowerShell terminal within IntelliJ IDEA - Observe the IDE selection menu
Expected Behavior
- IntelliJ IDEA should be detected only once in the IDE selection menu
- Auto-connect to IDE should work properly without user intervention
- The IDE integration should function seamlessly
Actual Behavior
- IntelliJ IDEA appears twice in the IDE selection list (both pointing to
/mnt/c/_GITHUB/spectrakr/k8s-cluster-packages) - Auto-connect to IDE fails due to duplicate detection
- User must manually type and select "/ide" to proceed
- The tip message suggests using
--ideflag or config, but auto-connect should work by default
Additional Context
- This issue started occurring after upgrading from a version prior to 1.0.57
- Previous versions correctly detected IntelliJ IDEA only once and auto-connect worked as expected
- The terminal setup involves running claude through WSL bash from within IntelliJ's PowerShell terminal
- Both duplicate entries show the exact same path:
/mnt/c/_GITHUB/spectrakr/k8s-cluster-packages - The issue appears to be related to the IDE detection logic when running through WSL from within the IDE itself
Version comparison:
- Version 1.0.52: Auto IDE connection works fastest
- Version 1.0.56: Shows as disconnected initially with slight delay, then connects automatically
- Version 1.0.57+: Duplicate detection causes auto-connect failure, manual "/ide" input required
I'm getting this too
Any updates on this yet team? Or how can we help debug further?
+1
I ran into the same issue today. I installed the Claude Code plugin in IDEA, but I didn't want to interact with Claude Code inside IDEA. I expected to connect to IDEA from an external terminal, but when I ran claude /ide I encountered the same problem as above. Later I found a workaround that worked for me — not sure if it will work for you, but you can try it.
Open Claude Code in IDEA. When I run claude from an external terminal and try to connect to IDEA with /ide, for me it always reports that my IDEA is running with its working directory at /mnt/c/Code/ProjectPath, regardless of whether the command configured in IDEA to run claude is claude or wsl -d Ubuntu -- bash -lic "claude".
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: /mnt/c/Code/ProjectPath
Because the path /mnt/c/Code/ProjectPath is in WSL, I then go into WSL from the terminal and change to the /mnt/c/Code/ProjectPath directory, and then open Claude. At that point the working directory shown by /status matches the path of the IDEA Claude Code plugin, and we can connect normally.
I ran into the same issue today. I installed the Claude Code plugin in IDEA, but I didn't want to interact with Claude Code inside IDEA. I expected to connect to IDEA from an external terminal, but when I ran
claude /ideI encountered the same problem as above. Later I found a workaround that worked for me — not sure if it will work for you, but you can try it.Open Claude Code in IDEA. When I run
claudefrom an external terminal and try to connect to IDEA with/ide, for me it always reports that my IDEA is running with its working directory at/mnt/c/Code/ProjectPath, regardless of whether the command configured in IDEA to run claude isclaudeorwsl -d Ubuntu -- bash -lic "claude".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: /mnt/c/Code/ProjectPathBecause the path
/mnt/c/Code/ProjectPathis in WSL, I then go into WSL from the terminal and change to the/mnt/c/Code/ProjectPathdirectory, and then open Claude. At that point the working directory shown by/statusmatches the path of the IDEA Claude Code plugin, and we can connect normally.
@xcyeye I don’t think this is the same issue as the one reported here. The original problem is about duplicate IntelliJ IDEA detection since v1.0.57, which directly breaks the auto-connect logic.
In my case, it’s not about adjusting the working directory path. The issue is that two IntelliJ IDEA instances are detected, and when navigating with the arrow keys on /ide, both entries get selected at the same time. Manual connection works only through this workaround, but auto-connect does not work, and this has been confirmed as the root cause being the duplicate detection itself.
So while your workaround helps in a path mismatch scenario, it doesn’t resolve the actual regression introduced after v1.0.57. The detection logic needs to be fixed to prevent duplicate IntelliJ entries.
Is this even under the radar or acknowledged by Anthropic? It's getting highly annoying in a day to day workflow having to type /ide everytime manually, furthermore sometimes it plains breaks and it doesn't see any open connection from IntelliJ either. Only option is to restart the IDE again, again and again, every day
To add more context, it also happens under WSL paths when opening the IDE from Windows. This is a common workflow for many Jetbrains users. Using Jetbrains Gateway is NOT a solution, but a workaround
I've had this issue also since first installing v1.0.126. Today I completely removed Claude code + the Jetbrains plugin and reinstalled, but I still have the same issue.
Claude Code: v2.0.1 PhpStorm: 2025.2.2 Jetbrains Plugin: 0.1.11-beta
I am running PHPStorm on Windows but using WSL2 and my project root is under WSL2. Claude code is installed within WSL2 and was installed using npm -g.
When pressing the orange claude plugin button in the IDE, Claude successfully launches but is unable to connect to the IDE. I have to type /ide, where I see two PHPStorm IDEs listed. I need to select this to connect successfully.
I think the Anthropic team should view this as a higher priority, because when first trying out Claude Code on Jetbrains it is not obvious that I need to use the /ide command and there is no way to fix the auto connect. So anyone trying this first the first time assumes it is broken and uninstalls (I almost uninstalled because of this issue).
has this issue too, very annoying. How can it be patched?
this is really annoying!
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.
I fixed this problem for VSCode on Linux. Claude had a leftover lock file in ~/.claude/ide, even after my editor had been closed. Once I deleted that the extra file, there were no more duplicates listed in Claude Code and auto-connection worked again.
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.
still not solved!
+1