Auto memory should be shared across git worktrees of the same repository
When using git worktrees, each worktree gets its own auto memory directory because the path is derived from the working directory:
/Code/app5→~/.claude/projects/-Code-app5/memory//Code/app5-pay-123→~/.claude/projects/-Code-app5-pay-123/memory/
This means learnings recorded in one worktree (e.g. "this billing system counts refunded orders as fulfilled") are invisible when working in another worktree of the same project.
Expected behavior: All worktrees sharing the same git origin should share a single auto memory directory. The memory path could be derived from the repo's remote URL or the main worktree path instead of the current working directory.
Use case: We use worktrees for parallel feature work. Learnings about the codebase (architecture patterns, common pitfalls, domain knowledge) apply across all worktrees. Currently, Claude re-discovers the same things in each worktree independently.
Related issues: #16600, #15776, #16089
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗