[BUG] /resume shows no sessions when project directory is an NTFS junction (VS Code extension + CLI resolve different paths)

Open 💬 2 comments Opened Jun 25, 2026 by cafedetal

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 a project directory is an NTFS junction (e.g. C:\Users\<user>\Development\MyProject → D:\MyProject), the VS Code extension and the Claude CLI subprocess resolve the working directory to different paths. The extension resolves the real target path (D:\MyProject) and looks for sessions under ~/.claude/projects/D--MyProject/. The CLI subprocess does not follow the junction and stores sessions under ~/.claude/projects/C--Users-<user>-Development-MyProject/. Running /resume in the extension shows an empty session list even though sessions exist on disk. The same behaviour is observed on the conversations side panel.

What Should Happen?

/resume should list all prior sessions for the project regardless of whether the project directory is a junction/symlink. The extension and CLI should agree on which directory key to use for session storage.

Error Messages/Logs

(no error is shown — /resume silently displays an empty list)

Steps to Reproduce

  • Create an NTFS junction for a project directory:

mklink /J C:\Users\<user>\Development\MyProject D:\MyProject

  • Open C:\Users\<user>\Development\MyProject in VS Code with the Claude Code extension active.
  • Start a Claude Code session and have at least one conversation.
  • In a new session, run /resume or look at conversation side panel.
  • Observe: session list is empty.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.183

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Root cause: VS Code's extension host calls fs.promises.realpath which follows NTFS junctions, resolving cwd to the junction target (D:\MyProject). The CLI subprocess uses realpathSync from a different Node.js runtime that does not follow junctions, so it stores sessions under the original path. The two processes key their session directories off different resolved paths and never see each other's data.

Workaround: Manually create NTFS junctions inside ~/.claude/projects/ mapping both resolved path names to the same underlying session directory, either direction.

View original on GitHub ↗

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