You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(gh): surface and automate worktree hygiene #2575
Keep issue worktrees from accumulating by making hygiene visible and part of normal flow.
Background
basectl gh worktree prune and gh branch prune already exist and default to dry-run. On 2026-10-15, a dry run in the maintainer's checkout reported 116 of 121 worktrees removable (merged PRs), 1 closed-unmerged retained, 0 dirty. The capability exists; nothing invokes it, so the count only grows, and an agent loop will create worktrees faster than a human does.
Next-release planning review of 2026-10-14/15 against main at 7faf6dfb. Tracking: #2555.
Scope
Emit a doctor or status finding with stale-worktree count and oldest age.
Add a cleanup step to the post-merge workflow documentation and to the loop's cleanup phase (see the loop contract).
Do not add new prune logic.
Acceptance Criteria
basectl doctor (or workspace status) reports the count and age.
Assignee: codeforester. Implementation-ready; use an issue-backed worktree.
Plan revision (2026-10-16)
This issue is intentionally scheduled for v1.13.0 so the loop's cleanup phase can consume the contract from #2576. Add #2576 as a prerequisite and cover interruption/abandon paths from #2602. The implementation must continue to use the existing safe, explicit prune semantics; visibility and handoff are the goal, not unattended deletion.
Activity