This tutorial walks through orchestrating multiple AI agents working simultaneously on different tasks. You will create three worktrees, monitor them from the Control Plane, send targeted and broadcast messages, share context, and merge everything in order.
What You'll Do
- Create 3 worktrees with different tasks and AI tools
- Monitor all agents from the Control Plane
- Send follow-ups and broadcast instructions
- Share cross-cutting context with
owt note - Check merge order with
owt queue - Merge in order and clean up
Step 1: Create Three Worktrees
Kick off three tasks from your project root:
$ owt new "Add user authentication with JWT"Task: Add user authentication with JWT
Branch: add-user-auth-jwt
Accept? [Y/n/edit]: Y
Creating worktree... Done.
Launching claude-code → sent task.$ owt new "Add rate limiting to API endpoints" --ai-tool opencodeTask: Add rate limiting to API endpoints
Branch: add-rate-limiting-api
Accept? [Y/n/edit]: Y
Creating worktree... Done.
Launching opencode → sent task.$ owt new "Write integration tests for user registration"Task: Write integration tests for user registration
Branch: write-integration-tests
Accept? [Y/n/edit]: Y
Creating worktree... Done.
Launching claude-code → sent task.Three agents are now working in parallel, each in its own isolated worktree, branch, and tmux session.
Step 2: Monitor from the Control Plane
Launch the Control Plane:
$ owt CONTROL PLANE ●3 active ○0 idle
┌─ auth-jwt ──────────────┐ ┌─ rate-limiting ─────────┐
│ ● WORKING 3m │ │ ● WORKING 2m │
│ add-user-auth-jwt │ │ add-rate-limiting-api │
│ claude +87 -4 │ │ opencode +34 -0 │
│ Add user auth with JWT │ │ Add rate limiting to API │
└─────────────────────────┘ └──────────────────────────┘
┌─ tests ──────────────────┐
│ ● WORKING 1m │
│ write-integration-tests │
│ claude +22 -0 │
│ Write integration tests │
└──────────────────────────┘
[↑↓←→] navigate [Enter] patch in [s] send [a] all [n] new [q] quitAll three cards show ● WORKING status with live diff stats updating in real time.
Step 3: Send Follow-Up Instructions
Send a targeted message to one agent:
$ owt send auth-jwt "Also add refresh token rotation"Sent to add-user-auth-jwtOr press s on a worktree in the Control Plane to send a message interactively.
Step 4: Broadcast to All Agents
Send an instruction to every agent at once:
$ owt send --all "Run tests before finishing"Sent to add-user-auth-jwt
Sent to add-rate-limiting-api
Sent to write-integration-testsYou can also press a in the Control Plane to broadcast interactively.
To broadcast only to agents that are currently working:
$ owt send --working "Double-check error handling"Step 5: Share Cross-Cutting Context
When something changes that affects all agents (e.g., a schema change), use owt note:
$ owt note "The User model now has a 'verified_at' timestamp column. Use it for email verification checks."Note added to CLAUDE.md in 3 worktrees:
add-user-auth-jwt
add-rate-limiting-api
write-integration-testsThis injects the note into each worktree's CLAUDE.md file, so every agent has the shared context.
Step 6: Check Merge Order
Once agents start finishing, check the optimal merge order:
$ owt queueMerge Queue (smallest changes first):
1. write-integration-tests +45 -2 ✓ COMPLETED
2. add-rate-limiting-api +89 -12 ✓ COMPLETED
3. add-user-auth-jwt +142 -37 ● WORKINGThe queue orders by change size (smallest first) to minimize merge conflicts.
Step 7: Merge in Order
Merge completed worktrees in queue order:
$ owt merge testsMerging write-integration-tests into main...
Phase 1: Merge complete (no conflicts)
Phase 2: Verification passed
Cleaning up...
Removed worktree, branch, and tmux session.
Done.$ owt merge rate-limitingMerging add-rate-limiting-api into main...
Phase 1: Merge complete (no conflicts)
Phase 2: Verification passed
Cleaning up... Done.Once the auth agent finishes:
$ owt merge auth-jwtMerging add-user-auth-jwt into main...
Phase 1: Merge complete (no conflicts)
Phase 2: Verification passed
Cleaning up... Done.Alternatively, ship all completed worktrees at once:
$ owt queue --shipStep 8: Clean Up
If any stale worktrees remain:
$ owt cleanupStale worktrees (no activity in 14+ days):
(none)
All clean.Scaling the Sprint
To add more tasks to the sprint, run another owt new for each one. Every task gets its own isolated worktree, branch, and agent session, so you can keep launching agents as the work grows:
owt new "Add user authentication"
owt new "Add rate limiting middleware"
owt new "Write integration tests"Then manage them all from the Control Plane (owt), shipping each worktree with owt ship or staging them with owt queue --ship as they complete.
Tips for Multi-Agent Sprints
- Start with independent tasks -- Avoid assigning tasks that touch the same files to different agents. Use
owt queueto check for file overlaps. - Merge smallest first --
owt queueorders by change size for a reason. Smaller merges are less likely to conflict. - Use notes for shared context -- When a schema, API contract, or dependency changes, broadcast it with
owt noteso all agents stay in sync. - Monitor overlap warnings -- The Control Plane shows
[! N overlap]when two worktrees touch the same files. Address these before merging.
What's Next?
- CI/CD Pipeline -- Automate with headless mode
- Solo Feature Build -- Single-agent walkthrough
- Parallel Features Workflow -- Workflow patterns