VS Code extension can't find sessions on mapped network drives (realpath resolves to UNC)

Resolved 💬 12 comments Opened Mar 11, 2026 by wjwilson Closed Apr 30, 2026

Problem

On Windows, when the project lives on a mapped network drive (e.g. U:\projects\my-app), the VS Code extension's listSessions() returns no results because:

  1. The CLI creates session .jsonl files in ~/.claude/projects/u--projects-my-app/ (encoded from the drive letter path)
  2. The VS Code extension calls fs.realpath() which resolves the mapped drive to its UNC path (\fileserver.example.com\share\projects\my-app)
  3. The UNC path encodes to a completely different directory name (--fileserver-example-com-share-projects-my-app)
  4. No sessions are found ÔÇö the sidebar is empty after every restart

Impact

  • All sessions created in VS Code disappear on restart
  • Sessions created in the terminal CLI are never visible in VS Code
  • Affects any Windows user whose workspace is on a mapped network drive (common in studios/enterprises with DFS/SMB shares)

Workaround

Create a symlink between the two directory names in ~/.claude/projects/:

mklink /D "%USERPROFILE%\.claude\projects\--fileserver-example-com-share-projects-my-app" "%USERPROFILE%\.claude\projects\u--projects-my-app"

Suggested fix

Either skip realpath() on Windows mapped drives, or normalize both the CLI and extension to use the same path before encoding the project directory name.

Environment

  • Windows 10/11, Claude Code 2.1.72
  • Mapped network drive (DFS/SMB)

View original on GitHub ↗

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