claude-code - 💡(How to fix) Fix /ide picker shows duplicate entries per PhpStorm window in WSL2 setup, defeating auto-connect [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54048Fetched 2026-04-28 06:40:40
View on GitHub
Comments
2
Participants
2
Timeline
9
Reactions
0
Timeline (top)
labeled ×5commented ×2closed ×1cross-referenced ×1

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.

Root Cause

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.

RAW_BUFFERClick to expand / collapse

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

Reproduction

  1. Have multiple PhpStorm windows open on Windows, each with a distinct project under WSL home (e.g., /home/user/web/<project>)
  2. From PhpStorm's integrated terminal OR from a standalone Windows Terminal/PowerShell with no JetBrains parent, run claude in WSL
  3. 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.

extent analysis

TL;DR

The issue can be mitigated by investigating and potentially modifying the lock file handling or the /ide picker logic to correctly identify and merge duplicate entries for each PhpStorm window.

Guidance

  • Investigate the /ide picker logic to understand how it generates the list of available IDEs and why it's creating duplicate entries for each PhpStorm window.
  • Review the lock file format and content to ensure that the workspaceFolders field is correctly populated and unique for each PhpStorm window.
  • Consider implementing a deduplication mechanism in the /ide picker to remove duplicate entries based on the workspaceFolders field or other unique identifiers.
  • Test the scenario with a single PhpStorm window to verify if the issue is specific to multiple windows or a more general problem.

Example

No code snippet is provided as the issue seems to be related to the internal logic of the Claude Code CLI and PhpStorm plugin, and without more context, it's difficult to provide a specific code example.

Notes

The issue seems to be specific to the WSL2 and Windows IDE setup, and the provided investigation suggests that the lock files are correctly generated on the Windows side. The problem might be related to how the /ide picker handles these lock files or how it discovers available IDEs.

Recommendation

Apply a workaround by manually selecting the correct IDE entry every session until a more permanent fix can be implemented, as the root cause of the issue is not yet fully understood.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix /ide picker shows duplicate entries per PhpStorm window in WSL2 setup, defeating auto-connect [2 comments, 2 participants]