[BUG] Past Conversations panel doesn't load local sessions when workspace is on a mapped network drive
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?
Environment
- VS Code extension: anthropic.claude-code 2.1.73 (and earlier versions)
- OS: Windows 11
- Workspace: on a mapped network drive (e.g., I:\ → \\server\share\...)
Bug description
The "Past Conversations" sidebar panel (IS_SESSION_LIST_ONLY view) only shows the currently active session and shows no sessions after restarting VS Code, even though session files exist on disk.
Sessions ARE correctly saved and visible when using the Claude Code CLI from the same directory.
Root cause
fs.realpathSync() / fs.realpath() resolve a mapped drive letter path to its UNC equivalent on Windows:
- Input:
I:\Projects\MyProject - Output:
\\server\share\Projects\MyProject
This happens in two places:
resolveSessionListViewin extension.js — setsLV.cwdusingIH.realpathSync(workspaceFolder.uri.fsPath)FS(z)in extension.js — used insideW66()when looking up the sessions directory
The session files are indexed by mD(path) which replaces non-alphanumeric chars with -. The sessions were saved under I--Projects-MyProject (drive letter path), but the extension looks up --server-share-Projects-MyProject (UNC path) — a different directory that doesn't exist.
Fix
In FS() and the realpathSync() calls: if the resolved path starts with \\ (UNC) but the input started with a drive letter, use the original path instead.
// FS() fix
async function FS(z) {
try {
let _r = (await d8.realpath(z)).normalize("NFC");
if (_r.startsWith("\\\\") && !z.startsWith("\\\\"))
return z.normalize("NFC");
return _r;
} catch {
return z.normalize("NFC");
}
}
Same pattern for realpathSync() calls in resolveSessionListView, resolveWebviewView, etc.
Impact
Any user whose VS Code workspace is on a Windows mapped network drive (common in corporate environments) will see this bug. The Past Conversations panel Local tab appears empty after restart.
### What Should Happen?
see What's Wrong with fix
### Error Messages/Logs
```shell
Steps to Reproduce
see What's Wrong with fix
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
last
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗