Skip to content

worktree

Armadillo’s native worktree CLI — creates isolated workspaces for parallel AI agent workflows with one-command branch creation, agent launch, merge automation, and cache sharing

ModelSourceCategory
sonnetcoreGit
TriggerAction
Any feature workworktree create <branch>
Parallel agent dispatchworktree launch <branch> "prompt" per agent
Check on parallel workworktree status or worktree list
Work is doneworktree merge <branch>
Discard workworktree remove <branch>
Cleanup merged branchesworktree prune
Full Reference

armadillo’s native worktree management. One command to create a worktree, one to launch an agent, one to merge and clean up. No external dependencies.

Mandatory Announcement — FIRST OUTPUT before anything else:

┏━ 🚀 worktree ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ [one-line description of what worktree work] ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
CommandWhatExample
worktree create <branch>New worktree + branch from mainworktree create feat/auth
worktree listAll worktrees with statusworktree list
worktree remove <branch>Remove worktree + branchworktree remove feat/auth
worktree merge <branch>Squash merge via PR + cleanupworktree merge feat/auth
worktree launch <branch> "prompt"Create + launch claude agentworktree launch feat/auth "Add OAuth"
worktree statusOverview + running agentsworktree status
worktree pruneRemove merged worktreesworktree prune

The killer pattern — launch multiple agents in parallel:

Terminal window
worktree launch feat/auth "Add OAuth login with Google" &
worktree launch feat/api "Build REST endpoints" &
worktree launch fix/checkout "Fix null pointer in checkout" &
wait

Each agent gets its own worktree, its own branch, shared deps cache. Zero conflicts.

Monitor with worktree status. Merge winners with worktree merge <branch>.

TriggerAction
Any feature workworktree create <branch>
Parallel agent dispatchworktree launch <branch> "prompt" per agent
Check on parallel workworktree status or worktree list
Work is doneworktree merge <branch>
Discard workworktree remove <branch>
Cleanup merged branchesworktree prune

Worktrees live in .claude/worktrees/ (auto-gitignored):

project/
├── .claude/worktrees/
│ ├── feat-auth/ ← branch / → -
│ ├── feat-api/
│ └── fix-checkout/

worktree create auto-detects stack and shares caches:

  • Node: hard-linked node_modules/ (zero disk overhead)
  • Rust: symlinked target/
  • Python: symlinked .venv/

See reference/commands.md for full flag documentation.

Called by:

  • dispatching-parallel-agents — parallel agent launch into worktrees
  • executing-plans — isolated workspace before task execution
  • subagent-driven-development — isolated workspace before task execution
  • armadillo-maker — branch isolation for skill/pack creation

Pairs with:

  • finishing-a-development-branch — merge/cleanup after work complete