[FEATURE] Use ''git rev-parse --git-common-dir'' for grouping worktrees, to recognize manually-created/managed worktrees
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I have a workflow that involves manually-created worktrees -- so I have a ~/dev/myproject as the main working tree, but also ~/dev/myproject+release where the release branch lives, ~/dev/myproject+issue-123 for a specific long-running issue, etc.
When I have a Claude Code session started in the myproject+release worktree, and try to resume it in the myproject worktree, the UUID isn't found. Using Ctrl+A to show "all projects" fails to show any content not from the current worktree.
Proposed Solution
Ideally, Claude's git project introspection would be capable enough to recognize worktrees it wasn't explicitly told about. Grouping by git rev-parse --common-dir would achieve this.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
Existing issues considered as possible duplicates include:
#5768 - arguably this is a more specialized subissue
#28769 - relevant but specific to the explicit --worktree flag, not in use here
It's not established whether the + characters used in my conventional paths being mapped to - characters in ~/.claude's filesystem structure has any relevance to this issue.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗