VS Code extension: session picker shows 'No sessions yet' for UNC network paths on Windows
Bug description
The session picker in the VS Code extension always shows No sessions yet when the working directory is a UNC network path (e.g. \server\share) or a mapped drive letter pointing to a network share (e.g. Z:\).
Sessions are saved correctly to disk but the session picker cannot find them.
Root cause (traced through extension.js)
The listSessions() method calls ife(cwd) which uses fs.realpath() to normalize the path before constructing the project directory key via gx().
On Windows, fs.realpath('\\server\share\') returns the extended UNC format \?\UNC\server\share (no trailing backslash). This produces a different key than the one used when writing sessions:
| Phase | Path passed | gx() result | Directory |
|-------|-------------|---------------|-----------|
| WRITE (claude.exe spawn) | \server\share\ | --server-share- | exists, sessions stored here |
| READ (listSessions via realpath) | \?\UNC\server\share | ----UNC-server-share | does not exist → empty list |
Same issue occurs with mapped drive letters (Z:\): realpath('Z:\') resolves to the UNC path, producing yet another key that does not match the z-- directory where sessions are stored.
Steps to reproduce
- Windows 11 with a mapped network drive or UNC path available
- Open VS Code with that path as the workspace folder (or set it as the CWD in the Claude Code pane)
- Create and complete one or more sessions
- Close the sessions
- Session picker shows No sessions yet even though session
.jsonlfiles are present in~/.claude/projects/
Expected behavior
Session picker lists all sessions for the current working directory, including those on network shares.
Environment
- OS: Windows 11
- Claude Code VS Code extension: 2.1.220
- Network path type: SMB share via UNC
Workaround
None available in the UI. Sessions can be resumed via CLI using claude --resume <session-id>.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗