[BUG] /resume and --resume fail on Windows mapped drive to WSL (both CLI and VS Code extension)

Resolved 💬 3 comments Opened Apr 15, 2026 by whw23 Closed Apr 19, 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?

When accessing a WSL directory via a Windows mapped drive letter (e.g., Z:\home\user\code\project mapped to \\wsl.localhost\Ubuntu\home\user\code\project), both the CLI (claude --resume) and the VS Code extension (/resume) fail to find any previous sessions.

Affects: CLI + VS Code extension (not just one of them)

Root cause: Same as #38186 and #33140 — realpathSync() resolves the mapped drive letter to the underlying UNC path (\\wsl.localhost\...), producing a different sanitized project directory name than what was used when the session was originally created.

  • Sessions created via Z:\... are stored under ~/.claude/projects/z--home-user-code-project/
  • On resume, realpathSync() resolves Z:\ to \\wsl.localhost\Ubuntu\..., so it looks in ~/.claude/projects/--wsl-localhost-Ubuntu-home-user-code-project/ — which doesn't exist

This affects every session, not just some — resume is completely broken in this setup.

Difference from existing issues

| Issue | Scope | Status |
|-------|-------|--------|
| #38186 | VS Code extension only, NAS/network drive | Open |
| #33140 | VS Code extension only, SMB drive | Open |
| #26815 | CLI only, Google Drive | Closed |
| This issue | Both CLI and VS Code extension, WSL mapped drive | — |

The underlying bug is the same (realpathSync path mismatch), but this report confirms it affects the CLI as well, not just the VS Code extension. WSL mapped drives are a common Windows development setup.

Environment

  • OS: Windows 11 Pro (Build 26200)
  • Shell: Git Bash / PowerShell
  • WSL: Ubuntu (accessed via Z:\ drive mapping to \\wsl.localhost\Ubuntu\)
  • Claude Code: Latest version (VS Code extension + CLI)

What Should Happen?

  1. claude --resume in the CLI should find sessions regardless of whether the CWD is accessed via a drive letter or UNC path
  2. The VS Code extension's session list should show all previous sessions
  3. The project directory identifier should be stable — either always use the original path without resolving, or normalize both paths to the same form

Suggested Fix

Skip or normalize realpathSync() on Windows when the path is on a mapped/virtual drive. Use the path as provided by the user/VS Code workspace, not the resolved UNC path. See #38186 for a detailed analysis.

View original on GitHub ↗

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