···2727```
28282929```bash
3030-mill run review.ts # returns runId, executes in background
3131-mill watch abc123 # stream events live
3232-mill run review.ts --sync # or block until done
3030+mill run review.ts # returns runId, executes in background
3131+mill watch --run abc123 # stream events live
3232+mill watch --run abc123 --channel io
3333+mill run review.ts --sync # or block until done
3334```
34353536## CLI
36373738```
3839mill run <program.ts> [--sync] [--json] [--driver <name>]
3939-mill status <runId> show run state
4040-mill wait <runId> --timeout block until complete/failed/cancelled
4141-mill watch [--run <runId>] stream tier-1 events (global if --run omitted)
4242-mill inspect <id>[.<spawnId>] inspect run or spawn detail
4343-mill inspect <id> --session resolve full agent session via driver
4444-mill cancel <runId> mark cancelled + kill worker process tree
4545-mill ls [--status <filter>] list runs
4646-mill init [--global] generate starter config (local or ~/.mill/config.ts)
4040+mill status <runId> show run state
4141+mill wait <runId> --timeout block until complete/failed/cancelled
4242+mill watch [--run <runId>] watch streams (default: events)
4343+ --channel events|io|all choose stream channel
4444+ --source driver|program io source filter (io/all only)
4545+ --spawn <spawnId> io spawn filter (io/all only)
4646+mill cancel <runId> mark cancelled + kill worker process tree
4747+mill ls [--status <filter>] list runs
4848+mill init [--global] generate starter config (local or ~/.mill/config.ts)
4749```
48504951All commands accept `--json` for machine-readable output on stdout (diagnostics go to stderr).
···6262]);
6363```
64646565-Each `mill.spawn()` submits an async mill run (`mill run --json`) and then follows completion via mill APIs (`wait` + `inspect`). Model selection, driver routing, and execution behavior all come from your mill configuration.
6565+Each `mill.spawn()` submits an async mill run (`mill run --json`) and then follows completion via mill APIs (`wait` + `watch --channel events`). Model selection, driver routing, and execution behavior all come from your mill configuration.
66666767By default, mill run storage uses mill's global default (`~/.mill/runs`) unless you explicitly pass `--runs-dir` (or set `millRunsDir`).
6868
+1-1
packages/pi-mill/index.ts
···360360 label: "Subagent",
361361 description: [
362362 "Spawn subagents for delegated or orchestrated work.",
363363- "Execution backend: mill async APIs (submit + watch + inspect). Configure drivers/executors/models via mill.config.ts.",
363363+ "Execution backend: mill async APIs (submit + watch + wait). Configure drivers/executors/models via mill.config.ts.",
364364 `Enabled models: ${modelsText}`,
365365 "Write a TypeScript script. `mill` is a global (like `process` or `console`). Use mill.spawn() to orchestrate agents.",
366366 "mill.spawn() returns a Promise<ExecutionResult>. Use `await` for sequential, `Promise.all` for parallel.",