Skip to content

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

  1. Create 3 worktrees with different tasks and AI tools
  2. Monitor all agents from the Control Plane
  3. Send follow-ups and broadcast instructions
  4. Share cross-cutting context with owt note
  5. Check merge order with owt queue
  6. Merge in order and clean up

Step 1: Create Three Worktrees

Kick off three tasks from your project root:

bash
$ 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.
bash
$ owt new "Add rate limiting to API endpoints" --ai-tool opencode
Task: Add rate limiting to API endpoints
Branch: add-rate-limiting-api
Accept? [Y/n/edit]: Y

Creating worktree... Done.
Launching opencode → sent task.
bash
$ 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:

bash
$ 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] quit

All 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:

bash
$ owt send auth-jwt "Also add refresh token rotation"
Sent to add-user-auth-jwt

Or 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:

bash
$ owt send --all "Run tests before finishing"
Sent to add-user-auth-jwt
Sent to add-rate-limiting-api
Sent to write-integration-tests

You can also press a in the Control Plane to broadcast interactively.

To broadcast only to agents that are currently working:

bash
$ 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:

bash
$ 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-tests

This 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:

bash
$ owt queue
Merge 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  ● WORKING

The queue orders by change size (smallest first) to minimize merge conflicts.

Step 7: Merge in Order

Merge completed worktrees in queue order:

bash
$ owt merge tests
Merging write-integration-tests into main...
  Phase 1: Merge complete (no conflicts)
  Phase 2: Verification passed

Cleaning up...
  Removed worktree, branch, and tmux session.

Done.
bash
$ owt merge rate-limiting
Merging add-rate-limiting-api into main...
  Phase 1: Merge complete (no conflicts)
  Phase 2: Verification passed

Cleaning up... Done.

Once the auth agent finishes:

bash
$ owt merge auth-jwt
Merging 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:

bash
$ owt queue --ship

Step 8: Clean Up

If any stale worktrees remain:

bash
$ owt cleanup
Stale 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:

bash
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 queue to check for file overlaps.
  • Merge smallest first -- owt queue orders 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 note so 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?