Symlink resolution breaks /ide integration when IDE uses symlink path

Resolved 💬 4 comments Opened Feb 8, 2026 by rodboev Closed Feb 8, 2026

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

  1. Create a symlink: ln -s /mnt/c/Dropbox/Projects /home/rod/Projects
  2. Open IDE to symlink path: codium /home/rod/Projects/AHK
  3. Start Claude Code from the same symlink path: cd /home/rod/Projects/AHK && claude
  4. Claude Code resolves the symlink and reports its working directory as /mnt/c/Dropbox/Projects/AHK
  5. Run /ide — it fails to find the IDE because the IDE is open to /home/rod/Projects/AHK

Expected Behavior

Claude Code should either:

  1. Respect the logical PWD (the symlink path the user navigated to) instead of resolving it via realpath, OR
  2. Provide a configuration option (e.g., settings.json or env var like CLAUDE_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_DIR setting exists for bash CWD but doesn't affect the primary working directory resolution

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗