The `get(id)` method on SimpleGitWorktreeManager used `path.endsWith(id)` to find worktrees. Since all agents working on the same project create worktrees with the same project name suffix (e.g., "codewalk-district"), cleanup for one agent could match and delete another agent's worktree. Fix: match on `basename(worktreesDir)/id` so each manager's lookups are scoped to its own worktree base directory.
12 KiB
12 KiB