# 07 · Run a Team of Agents (`blackbird platoon`)

> Canonical HTML: https://multiplayer.tech/blackbird/teams/
> Manual Index: https://multiplayer.tech/blackbird/index.md

Put multiple agents on the same repo at once. Each teammate gets its own git worktree so they never collide on disk, coordinating on a shared board via `blackbird platoon` (or `/platoon` inside a TUI session).

## 1. Lease a Worktree
```bash
blackbird platoon lease-acquire \
  --repo ~/code/app \
  --leases ~/code/app-leases \
  --id builder --branch team/builder
```
Creates a worktree on a fresh branch and prints its path. Repeat once per teammate.

## 2. Spawn an Agent
```bash
blackbird platoon spawn --board ~/code/app-board \
  --id builder --role builder \
  --provider openai --model gpt-6.1-sol --effort low \
  --executable ~/.local/lib/blackbird/current/bin/blackbird \
  --working-dir ~/code/app-leases/builder \
  --wait-ms 300000 \
  --prompt "Add a --shout option to greet.sh, test it, and commit. Then run:
    blackbird platoon post --board ~/code/app-board --from builder --to all
      --kind handoff --text 'what you did and the commit hash'"
```
`spawn` starts one agent on one task, registers it on the board, waits up to `--wait-ms` (default 30s), stops it if still running, and prints a JSON summary with the output tail. `--executable` always takes an absolute path.

## 3. Coordinate on the Board
```bash
blackbird platoon read --board ~/code/app-board
blackbird platoon post --board ~/code/app-board --from you --to builder \
  --kind message --text "Nice. Can --shout work as the second argument too?"
blackbird platoon members --board ~/code/app-board
```
Messages target `--to all` or a single agent ID, with one of 8 kinds: `brief`, `message`, `handoff`, `blocker`, `decision`, `artifact`, `review`, `status`.

## 4. Mix in Claude Code
```bash
blackbird platoon spawn --board ~/code/app-board \
  --id reviewer --role reviewer \
  --driver claude_code --provider anthropic --model sonnet \
  --executable "$(command -v claude)" \
  --working-dir ~/code/app-leases/reviewer \
  --extra-arg --allowedTools \
  --extra-arg "Bash(git -C ~/code/app show:*) Bash(blackbird platoon:*)" \
  --wait-ms 300000 \
  --prompt "Read the board with: blackbird platoon read --board ~/code/app-board
Review the builder's commit with: git -C ~/code/app show team/builder
Post your review with: blackbird platoon post --board ~/code/app-board
  --from reviewer --to builder --kind review --text 'your review'"
```
`blackbird` and `claude_code` are verified end-to-end. Drivers for `codex`, `pi`, `antigravity`, and `acp` are also wired in.

## 5. Release the Worktree
```bash
blackbird platoon lease-release --repo ~/code/app --leases ~/code/app-leases --id builder
```
Removes the worktree directory while preserving the branch and its commits for merging. Refuses to release a worktree with uncommitted changes.
