[BUG]
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Title: Session history panel finds 0 sessions when workspace is on a mapped/virtual network drive (realpath UNC mismatch)
Body:
Environment:
Claude Code VSCode extension v2.1.226 / v2.1.227
Windows 11
Workspace opened from a mapped network drive (net use F: \\SERVER\share, in my case via a CBFS Connect virtual-drive provider)
Bug:
Session transcripts exist on disk (~/.claude/projects/<sanitized-cwd>/*.jsonl, verified non-empty and valid) but the "Session history" panel in the VSCode extension shows nothing for the workspace.
Root cause (traced in extension.js):
When a session is recorded, the project folder name is derived from the raw workspace cwd string (e.g. F:\Projects\...).
When the history panel looks up sessions (listSessions() → cfe() → await fs.realpath(cwd)), the cwd is canonicalized first. On Windows, fs.promises.realpath resolves through GetFinalPathNameByHandle, which for a mapped/virtual network drive returns the UNC form instead of the drive letter — e.g. F:\Projects\... resolves to \\?\UNC\SERVER\share\Projects\....
The sanitized UNC-derived folder name (--SERVER-share-Projects-...) never matches the folder the transcripts were actually written to, so the lookup finds zero sessions.
Workaround: Opening the workspace via the UNC path directly (instead of the mapped drive letter) avoids the realpath rewrite, since UNC paths are already canonical.
What Should Happen?
Show history.
Error Messages/Logs
Steps to Reproduce
Map a network share to a drive letter (net use F: \\server\share or any virtual-drive provider).
Open a project folder from that drive letter in VSCode.
Run a few Claude Code sessions (transcripts appear correctly in ~/.claude/projects/).
Open the "Session history" panel — it's empty.
Expected: Session recording and session lookup should canonicalize the cwd the same way (either both raw, or both realpath'd), so history stays consistent regardless of whether the workspace lives on a local or mapped/network drive.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
claude isn't on PATH in either shell — you're running this session purely through the VSCode extension, not a standalone CLI install.
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_