Skills
Run background Claude Code agents in isolated git worktrees with automatic cleanup
Launching an agent with run_in_background: true plus isolation: "worktree" gives it its own working directory and branch sharing the same repo history, so parallel agents never touch each other's files and you keep working in the main session until you're notified — no polling. Set isolation: worktree in a subagent's frontmatter to make it permanent. Cleanup is automatic: an unchanged worktree (no commits, no untracked files, no uncommitted edits) is removed on exit, so disposable parallel work leaves no residue.
↳ Follow the thread