/resume fails to find conversations in git submodule repos
Bug Description
/resume always returns "No conversations found to resume" when running inside a git submodule, even though conversations exist and are being saved correctly.
Root Cause
There's a path mismatch between how sessions are written vs discovered:
- Writing: Sessions are saved using the actual CWD, e.g.:
~/.claude/projects/-Users-moshefromer-triplewhale-backend/
- Discovery:
/resumecallsgit worktree listto find related project directories. For submodules, the main worktree is reported as the internal git path:
```
/Users/moshefromer/triplewhale/.git/modules/backend
-Users-moshefromer-triplewhale--git-modules-backend
This encodes to , which **doesn't match** the actual project directory -Users-moshefromer-triplewhale-backend`.
Since the encoded worktree path doesn't match the actual session storage directory, the session scanner finds zero conversations.
Reproduction
- Have a repo structured as a git submodule (e.g.,
triplewhale/backendis a submodule insidetriplewhale/) - Run Claude Code from the submodule directory — conversations are created normally
- Run
/resume— returns "No conversations found to resume" - Verify
git worktree listshows the main worktree as.git/modules/<name>instead of the actual path
Expected Behavior
/resume should find conversations stored under the actual CWD path, regardless of what git worktree list reports for submodules.
Environment
- Claude Code version: 2.1.50
- OS: macOS (Darwin 24.4.0)
- Node: v22.12.0
Workaround
Resuming by session ID directly works:
claude --resume <session-uuid>This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗