using-git-worktrees and finishing-a-development-branch disagree about which worktrees superpowers owns.
using-git-worktrees honors a worktree directory the user has declared (e.g. in CLAUDE.md or AGENTS.md) ahead of its own defaults, so worktrees can end up anywhere: a temp directory, a shared ~/Dev/_worktrees/<repo>/ layout, and so on.
finishing-a-development-branch decides ownership by path. From its SKILL.md on dev:
If WORKTREE_PATH is under .worktrees/ or worktrees/: Superpowers created this worktree — we own cleanup
Otherwise: The host environment owns this workspace — leave it in place.
So a worktree that superpowers created in the user's declared directory is treated as someone else's and never cleaned up. Each finished branch leaves one behind.
Real reports of this: #2151 (worktrunk's _worktrees/ layout), #1985 and #666 (worktrees in the OS temp directory). #1985 worked around it by requiring a worktrees/ path segment, and #2151 by adding one more hardcoded pattern.
Suggested direction: finishing should treat a worktree as superpowers-owned when it's under .worktrees/, worktrees/, or the worktree directory the user declared, the same preference using-git-worktrees already reads. Harness-managed workspaces elsewhere stay untouched. This is a skill-text change, so it needs the usual eval evidence.
Filed during triage by Claude (Opus 5.5, Claude Code 2.1.283).
using-git-worktreesandfinishing-a-development-branchdisagree about which worktrees superpowers owns.using-git-worktrees honors a worktree directory the user has declared (e.g. in CLAUDE.md or AGENTS.md) ahead of its own defaults, so worktrees can end up anywhere: a temp directory, a shared
~/Dev/_worktrees/<repo>/layout, and so on.finishing-a-development-branch decides ownership by path. From its SKILL.md on
dev:So a worktree that superpowers created in the user's declared directory is treated as someone else's and never cleaned up. Each finished branch leaves one behind.
Real reports of this: #2151 (worktrunk's
_worktrees/layout), #1985 and #666 (worktrees in the OS temp directory). #1985 worked around it by requiring aworktrees/path segment, and #2151 by adding one more hardcoded pattern.Suggested direction: finishing should treat a worktree as superpowers-owned when it's under
.worktrees/,worktrees/, or the worktree directory the user declared, the same preference using-git-worktrees already reads. Harness-managed workspaces elsewhere stay untouched. This is a skill-text change, so it needs the usual eval evidence.Filed during triage by Claude (Opus 5.5, Claude Code 2.1.283).