Clean up finished worktrees
For people whose sessions work in separate copies of a git project: Yardmaster removes a copy once its work has a pull request, and the Dev Pipeline panel can tidy the rest on a schedule.
This page is for people whose sessions work in a worktree: a separate copy of a git project, so several agents can work side by side. Each copy takes disk space, so Yardmaster removes copies whose work is done.
What happens on its own#
When you archive a session whose branch already has a pull request on GitHub, Yardmaster removes its worktree and shows "Cleaned up worktree for" the session's name. To have it clean up quietly, turn off Show a notification when a worktree is cleaned up on archive.
Tidy the rest from the Dev Pipeline panel#
In the panel's Setup tab, the Worktree cleanup section has two switches, both off at first:
Tidy landed worktrees automatically removes, on a schedule, worktrees whose branch has already landed and that have sat idle. It is free. It runs on Windows, where it also shows Recent runs, How often to tidy and Run cleanup now.
Session-based cleanup works on every system, for your active Dev Pipeline projects. It removes the safe worktrees for free and starts a careful AI session to look at the uncertain rest.
The same switch in Settings. Show the in-app worktree cleanup dashboard in Settings > Performance is the same automatic tidying switch. On Windows its dashboard can also bring back a worktree that was removed by mistake.
Many sessions at once. Pace worktree building (recommended) builds new worktrees a few at a time so a burst of new sessions can't freeze your computer.
Related
- Yardmaster or my computer feels slowThe fixes for a sluggish app or a computer that freezes while agents work, cheapest first: a few switches, a restart, and freeing memory.
- Let auto-replies answer your agentsAuto-replies answer or tidy up a session when its agent says something you expect, so work keeps moving while you are away.