orchestrate
orchestrate
Drive background worker agent-CLI sessions from this session — claude by default, other agent CLIs via --agent (see "Agent profiles" below). Each worker lives in its own tmux pane (private socket) or cmux workspace; you supervise by screen-scraping its TUI. One script, orchestrate.sh, backs every step and is mux- and agent-agnostic. Loop commands print machine-parseable KEY=VALUE lines on stdout (diagnostics go to stderr): you parse one line per worker, never a screen dump.
# `orchestrate.sh` ships in THIS skill's directory (next to this SKILL.md). Set
# ORCH to its absolute path — the directory this SKILL.md was loaded from. This
# resolves the usual install/repo locations (canonical copy first, repo last):
ORCH="$(command ls \
"$HOME/.agents/skills/orchestrate/orchestrate.sh" \
"$HOME/.claude/skills/orchestrate/orchestrate.sh" \
"./skills/orchestrate/orchestrate.sh" 2>/dev/null | head -1)"
[ -x "$ORCH" ] || echo "orchestrate.sh not found — set ORCH to this skill's orchestrate.sh"
SAFETY (read first)
Workers launch their agent CLI in full-auto mode (claude --dangerously-skip-permissions, codex --dangerously-bypass-approvals-and-sandbox, gemini --yolo, or whatever the profile's P_CMD says) — they edit files and run commands with no approval prompts. Only spawn against directories the user has entrusted to autonomous work. Never auto-answer a worker's dialog: when run/wait/waitall/poll reports NEEDS_INPUT, surface the rendered dialog (poll or logs) to the user and let a human decide. Deliver their decision with --answer — send/run refuse to type into a live human-decision dialog without it, and you must NEVER pass --answer on your own initiative. The only auto-dismiss is the one-time first-run folder-trust prompt at spawn (an environment prompt, not a task decision).