Run agents on parallel worktrees, not branches
git worktree gives each agent its own checkout — no stash/switch dance, no clobbered uncommitted work.
- Type: Prompt
- Tags: Coding Agent Hacks, Intermediate, Claude Code, Codex, Cursor
- Updated: 2026-10-01
Prompt
git worktree gives each agent its own checkout — no stash/switch dance, no clobbered uncommitted work. If you run two agents in one repo on different tasks, one will trash the other's working tree. `git worktree add ../repo-feat-x feat/x` gives you a parallel directory pointing at the same git history. Open one editor per worktree, run one agent per editor. Implementation example: git worktree add ../myapp-auth feat/auth git worktree add ../myapp-billing feat/billing # Each is a real checkout — open in its own editor + agent cd ../myapp-auth && claude cd ../myapp-billing && claude git worktree list # see them all git worktree remove ../myapp-auth # when shipped
More prompts
- Expense Report Automation System — Save More Time
- Meeting Scheduling Link Standardization — Save More Time
- Invoice Generation and Delivery Automation — Save More Time
- Document Template Automation Library — Save More Time
- Calendar Management Automation Rules — Save More Time
- File Organization and Naming System — Save More Time
- Recurring Payment Automation Setup — Save More Time
- Data Entry Elimination Framework — Save More Time