Teleport/resume should discover sessions across git worktrees
Problem
claude --teleport and claude --resume <id> cannot find sessions running in a different git worktree of the same repository.
Session discovery is scoped by directory path, so worktrees (which share the same git remote) are treated as entirely separate projects. This means you can teleport to a session on a completely different machine via cloud sessions, but you can't discover a session running in ~/repo from ~/repo.worktree on the same machine.
Reproduction
- Have a repo at
~/paul/flokaywith a worktree at~/paul/flokay.plan - Start a Claude Code session in
~/paul/flokay - From
~/paul/flokay.plan, runclaude --teleport→ "No Claude Code sessions found" - From
~/paul/flokay.plan, runclaude --resume <session-id>→ "No conversation found"
Expected behavior
Teleport and resume should discover sessions from any worktree of the same repository, since they share the same git remote origin. Session discovery should match on git remote (like remote teleport does for cloud sessions) in addition to directory path.
Environment
- macOS (Darwin 24.6.0)
- Git worktrees created via
git worktree add
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗