Expand description
Git worktree isolation for subagents — creation, fast-resume, cleanup.
Provides safe worktree creation with slug validation, canonical git-root resolution, fast-resume, dirty-state detection, and cleanup. Designed to prevent worktree nesting and protect the main repo from accidental mutation by isolated subagent runs.
Structs§
- Worktree
Info - Info about a created or resumed worktree.
Functions§
- cleanup_
stale_ subagent_ worktrees - Clean up stale ephemeral subagent worktrees older than the cutoff.
- create_
subagent_ worktree - Create or resume a git worktree for a subagent.
- has_
worktree_ changes - Check if a worktree has uncommitted changes (modified or untracked files).
- remove_
subagent_ worktree - Clean up a subagent worktree.
- validate_
slug - Validate a slug for use in worktree paths and branch names.