C:/Program Files/Git/resume fails on Windows due to case-sensitive path comparison against git worktree output
Bug
/resume always returns "No conversations found to resume" on Windows when the shell's working directory casing differs from git's canonical path casing.
Root Cause
When /resume runs, it:
- Calls
git worktree list --porcelain, which returns paths using the canonical Windows casing (e.g.C:/Users/Ezra/Desktop/...with capitalD) - Normalizes the path to a project key:
C--Users-Ezra-Desktop-EM-2026-portfolio2026 - Does a case-sensitive
===comparison against project directory names in~/.claude/projects/
But if the user originally launched Claude Code from a shell where the CWD had different casing (e.g. cd C:\Users\Ezra\desktop\... with lowercase d), the project directory on disk is C--Users-Ezra-desktop-EM-2026-portfolio2026.
"Desktop" !== "desktop" → zero matches → "No conversations found to resume."
Windows paths are case-insensitive, so the user never notices the mismatch — everything works except /resume.
Additional Detail
- There is a fallback path that uses the raw CWD (which would match), but it only triggers when
git worktree listreturns ≤1 result. Users with multiple worktrees never hit the fallback. - The same case-sensitive comparison in
Bd()also prevents identifying the current worktree in the list.
Repro Steps
- On Windows,
cdto a git repo using non-canonical casing (e.g.cd C:\Users\Ezra\desktop\...where the actual folder isDesktop) - Run
claudeand have a conversation - Exit, relaunch, run
/resume - Result: "No conversations found to resume"
- The JSONL conversation files exist in
~/.claude/projects/under the lowercase key
Expected Behavior
/resume should find conversations regardless of path casing on Windows.
Suggested Fix
Case-insensitive comparison when process.platform === 'win32':
// In the project directory matching logic
const normalize = process.platform === 'win32'
? (s) => s.toLowerCase()
: (s) => s;
if (normalize(dirName) === normalize(projectKey) || normalize(dirName).startsWith(normalize(projectKey) + "-"))
Same treatment needed in the worktree-to-CWD matching in Bd().
Environment
- Windows 11, PowerShell
- Claude Code (latest as of 2026-02-06)
- Git reports canonical path via
git worktree list --porcelainwith different casing than shell CWD
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗