Git Worktree Cleanup at Scale Worktrees are lightweight working directories sharing a store, useful for parallel agent work. However, stale worktrees block branch deletion and consume disk space. List active worktrees with , identify ones on merged/obsolete branches, then remove with before deleting the branch. This is especially critical in automation-heavy repos where agent sessions leave behind worktrees. Implement automated cleanup hooks to prevent accumulation. ---