[BUG] Windows: sessions disappear from VS Code Session history, cwd recorded as both c:\ and C:\ in one transcript

Status Open
Reported on v2.1.282
Maintainer reply None cached
Activity 2 comments · opened Sep 25, 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?

After restarting VS Code or rebooting, conversations are missing from the Session history list entirely, not just out of order. The transcripts are intact in ~/.claude/projects/c--repos-preveil-ai-workb/ and claude --resume <id> opens them.

Every transcript records its cwd under several spellings of the same folder: c:\repos\preveil-ai\workb, C:\repos\preveil-ai\workb and /c/repos/preveil-ai/workb (the last from the Bash tool). The session's own "Environment update" notices flip between c: and C: mid-conversation. The sessions missing from the list are the ones that started as c: (which is how VS Code opens the folder) but whose later records became C:. I suspect sessions are matched to the workspace folder by a case-sensitive path comparison.

What Should Happen?

Every session for a folder appears in that folder's Session history, however the drive letter or path form was recorded. The cwd should be recorded in one normalized form, and matched case-insensitively on Windows

Error Messages/Logs

None shown. Transcript evidence (counts of "cwd" values in one session):

541 "cwd":"C:\\repos\\preveil-ai\\workb"
 64 "cwd":"c:\\repos\\preveil-ai\\workb"
 68 "cwd":"/c/repos/preveil-ai/workb"

Steps to Reproduce

On Windows, open a folder in VS Code (the path shows as lowercase c:\...) and start a Claude Code session in the sidebar.
Work normally with both the Bash and PowerShell tools until "Environment update" notices show the working directory flipping between c: and C:.
Restart VS Code and open Session history. The session is missing.
In the transcript, rewrite every cwd value to the spelling on the first record (attached FixSessions.ps1.txt, -Paths). The session reappears.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.282 (VS Code Extension)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

he attached workaround script's -Paths switch rewrites every cwd spelling in a transcript to the one it started with. It runs from SessionStart/SessionEnd hooks.

View original on GitHub ↗

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