C:/Program Files/Git/resume fails on Windows due to case-sensitive path comparison against git worktree output

Resolved 💬 5 comments Opened Feb 6, 2026 by ezmill Closed Mar 7, 2026

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:

  1. Calls git worktree list --porcelain, which returns paths using the canonical Windows casing (e.g. C:/Users/Ezra/Desktop/... with capital D)
  2. Normalizes the path to a project key: C--Users-Ezra-Desktop-EM-2026-portfolio2026
  3. 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 list returns ≤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

  1. On Windows, cd to a git repo using non-canonical casing (e.g. cd C:\Users\Ezra\desktop\... where the actual folder is Desktop)
  2. Run claude and have a conversation
  3. Exit, relaunch, run /resume
  4. Result: "No conversations found to resume"
  5. 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 --porcelain with different casing than shell CWD

View original on GitHub ↗

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