[BUG] Session resume fails on macOS case-insensitive filesystem when path casing differs

Resolved 💬 1 comment Opened Apr 15, 2026 by mblevin Closed May 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

claude --resume shows "no sessions to resume" when the working directory path casing differs from when sessions were originally created. For example, launching from ~/Projects/my-repo creates sessions, but resuming from ~/projects/my-repo finds nothing.

On macOS (APFS, case-insensitive by default), these are the same directory (same inode). Claude Code generates the project storage key from the literal path string, preserving casing:

  • ~/Projects/repo-Users-me-Projects-repo
  • ~/projects/repo-Users-me-projects-repo

Session lookup does a case-sensitive match against the key, so sessions filed under one casing are invisible when launching from the other. The session files are all present on disk — the bug is purely in the key lookup logic.

This also affects project-scoped memory and settings under ~/.claude/projects/.

What Should Happen?

claude --resume should find sessions regardless of path casing on case-insensitive filesystems. Both ~/Projects/repo and ~/projects/repo should resolve to the same project key.

Steps to Reproduce

  1. mkdir -p ~/Projects/test-repo && cd ~/Projects/test-repo && git init
  2. Run claude, have a conversation, exit
  3. cd ~/projects/test-repo (lowercase p — same directory on case-insensitive FS)
  4. claude --resume
  5. Result: "No sessions to resume"

You can verify it's the same directory: stat -f "%i" ~/Projects ~/projects returns the same inode.

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.92 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Suggested fix: Normalize the working directory to a canonical form before generating the project storage key. Options:

  • fs.realpathSync() (resolves symlinks + canonical casing)
  • Lowercase the path on case-insensitive filesystems
  • Compare by inode/device ID instead of path string

Workaround: Rename the project directory under ~/.claude/projects/ to match the casing your shell resolves (requires a two-step mv on case-insensitive FS since direct case-only renames don't work).

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗