[BUG] Chat history empty when workspace is on a mapped network drive (Windows)
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?
Chat history panel shows an empty list after VSCode restart when the workspace folder is on a Windows mapped network drive.
What Should Happen?
The hP() function in extension.js calls fs.realpath() to normalize the project path. On Windows, when a workspace is on a mapped network drive (e.g., T: → \\server\share), fs.realpath() resolves the drive letter to the UNC path:
Input: t:\rob.a\sfk
fs.realpath() output: \\almaalpinex-10\it\rob.a\sfk
The tq() function then maps this to directory name --almaalpinex-10-it-rob-a-sfk, while sessions were originally saved under t--rob-a-sfk. Since these don't match, Ij() returns undefined and fetchSessions returns an empty array.
Error Messages/Logs
Steps to Reproduce
- Map a network share to a drive letter (e.g., net use T: \\server\share)
- Open a workspace folder on that drive in VSCode
- Start a Claude Code conversation
- Close and reopen VSCode
- The chat history panel is empty (but .jsonl session files exist in ~/.claude/projects/)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.1.79
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Environment
Windows 11 Pro
Claude Code extension v2.1.79
Non-admin user account
Workaround
Create a directory junction in ~/.claude/projects/ from the UNC-mapped name to the drive-letter name:
mklink /J "\\?\C:\Users\<user>\.claude\projects\--server-share-path" "\\?\C:\Users\<user>\.claude\projects\t--path"
Suggested Fix
Either:
Don't use fs.realpath() for the project path mapping (use the path as provided by VSCode)
Or normalize both the save and load paths consistently (always use realpath or never)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗