[BUG] Past Conversations empty on Windows with mapped network drives (realpath resolves to UNC path)

Resolved 💬 12 comments Opened Mar 13, 2026 by ironcannibal Closed May 28, 2026

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?

Description

The VS Code extension's session loading silently fails when the workspace is on a mapped network drive (e.g., Z:\Claude Code). The "Past Conversations" dropdown shows only the current session — all historical sessions are missing.

Root Cause

The extension calls fs.realpath() on the workspace path, which on Windows resolves mapped drives to their UNC path:

  • Input: z:\Claude Code
  • realpath output: \\192.168.1.15\MIKE - DROPBOX\Claude Code

The sanitized UNC path (--192-168-1-15-MIKE---DROPBOX-Claude-Code) doesn't match the project directory created by the CLI (z--Claude-Code), so readdir fails with ENOENT and the error is silently swallowed.

Steps to Reproduce

  1. Map a network share to a drive letter (e.g., Z:)
  2. Open VS Code with a workspace on the mapped drive
  3. Have multiple Claude Code conversations
  4. Close and reopen VS Code
  5. Click "Past Conversations" dropdown — only the current session appears

Workaround

Create a Windows junction linking the UNC-sanitized name to the real project dir:

New-Item -ItemType Junction -Path "$HOME\.claude\projects\--192-168-1-15-MIKE---DROPBOX-Claude-Code" -Target "$HOME\.claude\projects\z--Claude-Code"


### What Should Happen?

Past Conversations should display all historical sessions regardless of 
whether the workspace is on a local drive or a mapped network drive. The 
CLI and VS Code extension should resolve the project directory name 
consistently.

### Error Messages/Logs

```shell
No visible errors — the failure is completely silent. The dropdown renders 
but shows only the current active session.

VS Code Output log (Claude VSCode channel) shows the request being sent 
but no corresponding response or error:

2026-03-13 15:13:23.106 [info] Received message from webview: {"type":"request","requestId":"177sxgvtwqi","request":{"type":"list_sessions_request"}}
2026-03-13 15:13:23.954 [info] Received message from webview: {"type":"request","requestId":"u2gpr7lwfp","request":{"type":"list_sessions_request"}}

(No list_sessions_response ever logged. Remote sessions work fine: "Fetched 2 remote sessions")

The underlying error is ENOENT on readdir for the UNC-sanitized path, 
caught and swallowed silently in the session loading code.

Steps to Reproduce

  1. Map a network share to a Windows drive letter (e.g., Z:)
  2. Open a workspace on the mapped drive in VS Code (e.g., Z:\my-project)
  3. Start a Claude Code conversation and close VS Code
  4. Reopen VS Code to the same workspace
  5. Click the "Past Conversations" dropdown — only the current session appears, historical sessions are missing

The mapped drive is key — the bug does not occur on local drives (C:\).

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

  • Claude Code extension: v2.1.75 (default model: Sonnet)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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