[BUG] /resume finds no conversations when project dir casing doesn't match git worktree list output (macOS)
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?
/resume and claude -r return "No conversations found to resume" even though all session JSONL files exist on disk and are valid. This happens when:
- The user has 2+ git worktrees (triggering the multi-worktree matching path)
- The
~/.claude/projects/directory name was created with different casing than whatgit worktree listreports
On macOS (case-insensitive filesystem), cd ~/valkai/onyx navigates to ~/Valkai/onyx successfully, but the shell sets $PWD to the lowercase path. Claude Code inherits this and creates the project directory as ~/.claude/projects/-Users-me-valkai-onyx (lowercase). However, git worktree list returns the canonical path with uppercase. The multi-worktree code path in the resume logic does a case-sensitive string comparison between the prefix derived from the git worktree path and the directory name on disk, so they don't match.
The single-worktree code path is unaffected because it uses readdirSync which resolves case-insensitively on macOS.
In the minified source, the relevant function (Bj9) has a caseInsensitive variable that is hardcoded to false:
let R = false; // caseInsensitive — hardcoded
let K = _.map(H => ({
path: H,
prefix: R ? YP(H).toLowerCase() : YP(H) // uses git's canonical casing
}));
// ...
for (let H of dirs) {
let z = R ? H.name.toLowerCase() : H.name; // uses stored casing from readdir
for (let {prefix} of prefixes)
if (z === prefix || z.startsWith(prefix + "-")) // case-sensitive, fails
}
What Should Happen?
/resume should find and list all session files regardless of directory name casing, especially on case-insensitive filesystems like macOS (default) and Windows.
Steps to Reproduce
- Have a git repo at a path with mixed casing (e.g.,
~/Valkai/onyx) - Navigate using different casing:
cd ~/valkai/onyx - Run
claude— this creates the project directory with lowercase casing - Have at least one conversation so a JSONL file exists
- Add a git worktree:
git worktree add ~/some-worktree some-branch - Start a new session:
claude -r - Result: "No conversations found to resume"
Without step 5 (no extra worktrees), /resume works fine because the single-worktree code path uses case-insensitive filesystem resolution.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Claude Code Version
2.1.75 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
Suggested fix: Set the caseInsensitive flag to true on macOS/Windows (case-insensitive filesystems), or canonicalize paths before comparison using the actual filesystem casing.
Workaround: Rename the project directory to match git's canonical casing:
# Two-step rename needed on case-insensitive FS
mv ~/.claude/projects/-Users-me-valkai-onyx ~/.claude/projects/-Users-me-valkai-onyx-tmp
mv ~/.claude/projects/-Users-me-valkai-onyx-tmp ~/.claude/projects/-Users-me-Valkai-onyx
And ensure you always navigate with the correct casing (e.g., add a shell alias: alias onyx='cd ~/Valkai/onyx').
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗