When gsdRoot() is called with a basePath inside .gsd/worktrees/<name>/, the git-root probe and walk-up logic can escape to the project root's .gsd directory. This causes ensurePreconditions() to create slice directories in the wrong location and deriveState() to read stale project-root state instead of worktree-local state. Add isInsideGsdWorktree() guard that detects the .gsd/worktrees/<name>/ pattern in the basePath before the git rev-parse probe runs. When detected, return the worktree-local .gsd path immediately. Also check the symlink-resolved path for the pattern (handles macOS /tmp -> /private/tmp). Closes #2594 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| agents | ||
| extensions | ||
| skills | ||
| GSD-WORKFLOW.md | ||