Local sessions list empty for workspaces on a mapped network drive (native realpath != session-write path on Windows)

Status Open
Reported on v2.1.210
Maintainer reply None cached
Activity 2 comments · opened Jul 17, 2026

Version: 2.1.210 (VSCode extension), Windows 11

Summary

When a VSCode workspace is opened on a mapped network (SMB) drive (e.g. Z:\ mapped to \\SERVER\share), the Local sessions tab always shows "No sessions yet", even though sessions exist and claude --resume from a terminal lists/loads them fine.

Root cause

Sessions are stored under ~/.claude/projects/<encoded-cwd>/. There's an inconsistency in how the cwd is resolved:

  • Session writer / CLI: uses the raw cwd Z:\fs.realpathSync('Z:\\') returns Z:\ → folder Z--. Sessions are written here.
  • Extension session lister (listSessionsGse): resolves the path with fs.realpathSync.native(), which on Windows resolves the mapped drive to its UNC target \\SERVER\share → folder --SERVER-share. This folder doesn't exist, so readdir throws and the list is empty.

Reproduction of the divergence:

fs.realpathSync('Z:\\')          // => 'Z:\\'                 (folder Z--)
fs.realpathSync.native('Z:\\')   // => '\\\\SERVER\\share'    (folder --SERVER-share)

Steps to reproduce

  1. Map a network share to a drive letter (net use Z: \\SERVER\share).
  2. Open Z:\ as a VSCode workspace, run a Claude Code session.
  3. Session file is written under ~/.claude/projects/Z--/.
  4. Open the Sessions panel → Local → "No sessions yet" (CLI claude --resume from Z:\ shows it correctly).

Impact

All local session history is invisible in the extension UI for any workspace on a mapped network drive.

Suggested fix

Use the same path-resolution strategy for listing as for writing (avoid realpathSync.native for the projects-folder key, or apply the same resolution in both places).

Workaround

Junction the folder the lister expects to the real one:

mklink /J "%USERPROFILE%\.claude\projects\--SERVER-share" "%USERPROFILE%\.claude\projects\Z--"

View original on GitHub ↗

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