zo build is the flagship command. It reads the plan, decomposes it into phases, generates contracts for every active agent, and launches the Lead Orchestrator in a tmux session that drives the team to completion.
Synopsis
Smart mode detection
zo build auto-detects what to do based on the project’s current state:
You don’t pass a flag for this,
zo build figures it out.
What it does
1
Validate plan
Parses the plan and runs full validation. Aborts on any error before launching the agent session.
2
Resolve project context
Finds memory, target, and delivery repo via
_load_project_context(). Supports both .zo/-portable layout and legacy top-level memory/.3
Build orchestrator
Decomposes the plan into phases (mode-specific). Generates contracts: per-agent inputs, outputs, success criteria, time budget, precedent. Builds the Lead Orchestrator’s spawn prompt with full context (plan + phases + agent roster + memory + coordination instructions + per-project agent adaptations).
4
Launch session
Creates a tmux pane (default) or runs headless (
--no-tmux). Pastes the Lead Orchestrator’s prompt. The Lead reads the full plan, creates the team via TeamCreate, and drives execution.5
Monitor
The Python
LifecycleWrapper observes via ~/.claude/tasks/ and the tmux pane. Captures lifecycle events, pipes them to JSONL comms log, prints the live task list and recent agent events in your terminal. Auto-launches the training dashboard split-pane during Phase 4.6
Gate handling
At every phase boundary, checks artifact contracts and oracle thresholds. Automated gates auto-PROCEED. Blocking gates pause; you approve via
/gates:approve or reject via /gates:reject.7
Finalise
On Phase 6 PROCEED, writes the final phase snapshot, generates a session summary, kills the tmux window, prints a Haiku 2-3 bullet summary, returns control to the invoking terminal.
Gate modes
--gate-mode controls human involvement:
- supervised (default)
- auto
- full-auto
Every gate pauses for human review. Maximum oversight. Best for the first run of a new project.
zo gates set <mode> -p <project>.
Permission prompts: —bypass-permissions
--gate-mode controls human involvement at ZO’s phase gates. Independently, Claude Code’s tool-call permission prompts can also be auto-approved with --bypass-permissions. The two are independent, but --gate-mode full-auto implicitly turns bypass on (no-human-on-gates plus must-click-every-tool is a contradiction).
Works in both tmux and headless modes:
- Headless (
--no-tmux): passes--dangerously-skip-permissionsto the Claude Code CLI. - Tmux (default): temporarily overlays
permissions.defaultMode: "bypassPermissions"onto your project’s.claude/settings.local.jsonfor the duration of the run. The original file is backed up to.claude/settings.local.json.zo-backupand restored automatically when the run exits (viaatexit). If ZO crashes mid-run, the nextzocommand auto-detects the stale backup and restores.
--no-tmux runs unconditionally bypassed permissions. Now they only bypass when --bypass-permissions or --gate-mode full-auto is set. If you previously relied on --no-tmux --gate-mode supervised for prompt-free runs, add --bypass-permissions to keep that behavior.
Cross-machine: —repo
When you’ve moved a project from one machine to another (Mac dev → GPU server), use--repo to point at the delivery repo containing the .zo/ layout:
zo build auto-detects --repo from the plan path when it’s inside .zo/plans/. So if you cd into the delivery repo and run zo continue, the inference happens for free.
Live monitoring
Whilezo build is running, you have several windows into what the team is doing:
tmux pane
Ctrl-b n switches to the agent session. Watch the Lead Orchestrator coordinate the team in real time. Ctrl-b p returns.Training dashboard
Auto-launched as a split-pane during Phase 4. Rich Live panel: progress bar, metrics table, sparkline, checkpoints. See
zo watch-training.Comms log
JSONL events at
logs/comms/<date>.jsonl. Five event types: message, decision, gate, error, checkpoint. Replayable.Options
Examples
First run of a fresh project
First run of a fresh project
supervised gate mode. The Lead Orchestrator runs Phase 1; you approve at every gate.Auto-mode after first validation
Auto-mode after first validation
Resume on a new machine
Resume on a new machine
zo continue is shorthand for zo build against the project’s known plan, with .zo/ auto-detected.Overnight unattended run
Overnight unattended run
Pro plan / student account, minimise token spend
Pro plan / student account, minimise token spend
Low-token mode with override
Low-token mode with override
What you’ll see
When zo build stops
The session ends cleanly when:
- Phase 6 completes: all artifacts present, all tests pass, oracle confirmed. The final delivery is in the delivery repo.
- A blocking gate is hit: human input required. The session stays alive in tmux; you approve/reject via slash commands.
- The autonomous experiment loop returns DEAD_END or BUDGET_EXHAUSTED: escalates to human.
- You
/exit: graceful shutdown. Session summary written, tmux window killed.
Next
Phases & gates
What happens at each phase and gate.
Memory & continuity
How
zo build resumes across sessions.