/resume shows empty session list in git worktree directories

Resolved 💬 3 comments Opened Apr 7, 2026 by VadSiam Closed Apr 7, 2026

Description

/resume shows an empty session list when Claude Code is launched from a git worktree directory, even though session JSONL files exist and were correctly written during previous sessions.

Environment

  • Claude Code v2.1.92
  • macOS (Darwin 25.4.0)
  • zsh

Setup

Main repo: ~/projects/main-repo
Worktree: ~/projects/worktree-dir (created via git worktree add)

$ git rev-parse --git-dir
~/projects/main-repo/.git/worktrees/worktree-dir

What happens

  1. Run claude from ~/projects/worktree-dir — works fine, session is created
  2. Session JSONL is saved to ~/.claude/projects/-projects-worktree-dir/ — correct
  3. Exit Claude Code
  4. Run claude again from the same directory
  5. /resume → shows empty list, immediately "Resume cancelled"

Expected

/resume should list sessions from ~/.claude/projects/-projects-worktree-dir/

Root cause hypothesis

/resume resolves project path via git root (which points to the main repo through .git/worktrees/), not via cwd. So it looks for sessions in the main repo's project directory instead of the worktree's project directory.

Evidence: the main repo directory has ~30 session files and /resume works there. The worktree directory has 4 session files but /resume never finds them.

Workaround

claude --resume <session-id> with explicit session ID works.

View original on GitHub ↗

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