/ide picker shows duplicate entries per PhpStorm window in WSL2 setup, defeating auto-connect
Summary
When running Claude Code CLI in WSL2 with PhpStorm running on the Windows host, the /ide picker shows two identical entries for each PhpStorm window. Because there are two entries instead of one unique match, auto-connect cannot fire and /ide selection is required every session.
Environment
- Claude Code: v2.1.119 (native install, WSL2 Ubuntu)
- WSL2: Ubuntu 24.04 with
networkingMode=mirrored - Host OS: Windows 11
- IDE: PhpStorm with Claude Code [Beta] plugin (https://plugins.jetbrains.com/plugin/27310-claude-code-beta-) installed
- Multiple PhpStorm windows open (one per project)
Reproduction
- Have multiple PhpStorm windows open on Windows, each with a distinct project under WSL home (e.g.,
/home/user/web/<project>) - From PhpStorm's integrated terminal OR from a standalone Windows Terminal/PowerShell with no JetBrains parent, run
claudein WSL - Run
/ide
Expected
Each running PhpStorm window should appear as exactly one entry in the picker. With one cwd-matching entry, auto-connect should fire (per docs) without prompting.
Actual
Each PhpStorm window appears TWICE in the picker. The cwd-matching project shows two identical entries, preventing auto-connect from identifying a unique match.
Investigation
Lock files on Windows side (C:\Users\<user>\.claude\ide\*.lock) show one file per PhpStorm window — no duplicates at the filesystem level:
\\\\
51712.lock → workspaceFolders: [\"/home/dtocci/web/omni-api\"]
54802.lock → workspaceFolders: [\"/home/dtocci/web/intranet\"]
55559.lock → workspaceFolders: [\"/home/dtocci/web/website\"]
63678.lock → workspaceFolders: [\"/home/dtocci/web/my.omni\"]
\\
WSL-side ~/.claude/ide/ does not exist.
Tested with and without JetBrains JediTerm env vars (\CLAUDE_CODE_SSE_PORT\, \TERMINAL_EMULATOR=JetBrains-JediTerm\). Duplicates persist in both cases — so the second entry is not from env-var discovery overlapping lock-file discovery.
Related
- #4675 — closed as \"not planned\"
- #34715 — JetBrains Rider duplicate on WSL2 (same scenario, different IDE)
- #14421 — IDE lock file deleted in WSL (related WSL-side bug)
Impact
Auto-connect, the most natural UX for \/ide\, is broken for the entire WSL2 + Windows IDE class of users. Manual \/ide\ selection is required every session.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗