Concepts

Cleanup

Delete the branches and worktrees finished work left behind, safely, with a way to restore each.

The Cleanup page

A project’s Cleanup page lists what its finished tickets (done, cancelled or archived) left behind: registered workspaces, local branches, branches on origin, worktrees, and previews still running. Each branch is checked against where its work should have landed.

From there you delete what landed: a local branch, a branch on origin, or a branch with its worktrees, one row or every eligible row at once. A dialog lists exactly what will go before anything does.

What is checked first

Just before it deletes anything, the board checks every item again on fresh git state:

  • the ticket is done, cancelled or archived;
  • the work landed in its base: merged, rebased or edited in;
  • no worktree has the local branch checked out;
  • the branch has not moved since you looked;
  • it is not protected: a base branch, the main checkout’s branch, origin’s default branch, or anything a ticket in work or an open PR uses.

A worktree goes only when git lists no changes or untracked files in it, never with --force, never the main checkout. A preview running from it is stopped first.

Each deletion is logged on its ticket as branch @ sha, and the page keeps the command that restores it.

What agents may delete

Agents may delete closed tickets’ landed local branches, through the same checks. Worktrees and branches on origin stay yours to delete.

Unattached uploads

The page also counts unattached uploads: files nothing on the board holds, such as images added to a new ticket that was never created. The board deletes them once they are a day old, every hour. Delete now does it at once.