Problem
Branch-audit candidates derived from --merged / upstream [gone] include branches currently checked out in linked PR worktrees (ghq sibling-worktree layout makes this the common case: e.g. feat/do-not-merge-gate merged into default yet checked out in ci-workflows-pr-do-not-merge-gate). git branch -d on such a branch fails or, forced, breaks the worktree.
Fix direction
Subtract git worktree list --porcelain branches from the candidate set; render them as a separate "checked out in worktree — clean up the worktree first" bucket routed to the worktree-management tool.
Problem
Branch-audit candidates derived from
--merged/ upstream[gone]include branches currently checked out in linked PR worktrees (ghq sibling-worktree layout makes this the common case: e.g.feat/do-not-merge-gatemerged into default yet checked out inci-workflows-pr-do-not-merge-gate).git branch -don such a branch fails or, forced, breaks the worktree.Fix direction
Subtract
git worktree list --porcelainbranches from the candidate set; render them as a separate "checked out in worktree — clean up the worktree first" bucket routed to the worktree-management tool.