/resume fails to find conversations in git submodule repos

Resolved 💬 3 comments Opened Feb 22, 2026 by Moshe-Fromer Closed Feb 26, 2026

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: /resume calls git worktree list to find related project directories. For submodules, the main worktree is reported as the internal git path:

``
/Users/moshefromer/triplewhale/.git/modules/backend
`
This encodes to
-Users-moshefromer-triplewhale--git-modules-backend, 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

  1. Have a repo structured as a git submodule (e.g., triplewhale/backend is a submodule inside triplewhale/)
  2. Run Claude Code from the submodule directory — conversations are created normally
  3. Run /resume — returns "No conversations found to resume"
  4. Verify git worktree list shows 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>

View original on GitHub ↗

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