Symlink resolution breaks /ide integration when IDE uses symlink path
Summary
Claude Code resolves symlinks when determining its working directory at startup. When an IDE (e.g., VSCodium, VS Code) is opened via a symlink path, /ide fails to connect because the paths don't match.
Environment
- OS: WSL2 (Ubuntu) on Windows 11
- IDE: VSCodium (also affects VS Code, JetBrains, etc.)
- Claude Code version: Latest (as of Feb 2026)
Steps to Reproduce
- Create a symlink:
ln -s /mnt/c/Dropbox/Projects /home/rod/Projects - Open IDE to symlink path:
codium /home/rod/Projects/AHK - Start Claude Code from the same symlink path:
cd /home/rod/Projects/AHK && claude - Claude Code resolves the symlink and reports its working directory as
/mnt/c/Dropbox/Projects/AHK - Run
/ide— it fails to find the IDE because the IDE is open to/home/rod/Projects/AHK
Expected Behavior
Claude Code should either:
- Respect the logical
PWD(the symlink path the user navigated to) instead of resolving it viarealpath, OR - Provide a configuration option (e.g.,
settings.jsonor env var likeCLAUDE_PRESERVE_SYMLINKS=1) to control whether symlinks are resolved
Current Behavior
Claude Code unconditionally resolves symlinks at startup (likely via fs.realpathSync() or equivalent), discarding the user's logical working directory. The /ide command then sends this resolved path when searching for connected IDEs, but the IDE doesn't recognize the resolved path as its project root.
Workaround
Open the IDE to the resolved (canonical) path instead of the symlink path:
codium /mnt/c/Dropbox/Projects/AHK # instead of /home/rod/Projects/AHK
This works but is a papercut for users with symlink-heavy workflows (e.g., WSL users who symlink Linux home directories to Windows mount points).
Additional Context
- This is especially common in WSL environments where users create symlinks from
/home/user/to/mnt/c/paths for convenience - The existing troubleshooting docs mention WSL IDE detection issues related to network/firewall, but not symlink path resolution
- The
CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIRsetting exists for bash CWD but doesn't affect the primary working directory resolution
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗