Skip to main content

reap_agent_worktree

Function reap_agent_worktree 

Source
pub fn reap_agent_worktree(agent_worktree: &AgentWorktree) -> AgentWorktreeReap
Expand description

Remove a completed subagent’s managed worktree, then reap the conventional branch behind it. Refuses anything but a porcelain-clean tree: the measured leak is clean trees whose gitignored target/ the CLI’s auto-clean does not count, while uncommitted edits are a tree the CLI handed back deliberately. Only branch is ever aimed at - a branch the subagent checked out itself is left to git’s normal lifecycle, the same rule the worker despawn applies.