/orchestrate:loopfrom orchestrate
Arm the repeating tick engine for whichever harness is running, with a cadence, stop conditions and a STOP file. Use after a tick to keep a programme moving unattended, when a loop has stalled and needs re-arming, or to stop one. Claude Code arms its native loop; Codex, agy and anything else use the bundled tmux driver.
Ships in orchestrate. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The tick is stateless, so the scheduler is interchangeable. Pick the one the current harness has.
┌──────────────┐ ┌───────────────────────────────┐
│ Claude Code │──▶│ native /loop + ScheduleWakeup │
└──────────────┘ └───────────────────────────────┘
┌──────────────┐ ┌───────────────────────────────┐
│ Codex, agy, │──▶│ orchestrate.sh loop --tmux │ STOP ends it
│ anything │ └───────────────────────────────┘
└──────────────┘
Arming a loop needs the ownership token from orchestrate:takeover, exported or
passed as --session. The driver hands it to every tick it spawns, and the
tmux form passes it into the session it creates. On Claude Code, keep it
exported in the session that arms /loop; the prompt below runs in that
session, so it inherits it.
Arm /loop in dynamic mode with this prompt, re-entered each wake:
Run one orchestrate tick for <programme>, following the orchestrate:tick skill.
Do not also run the bundled driver. Two schedulers means double messages.
${CLAUDE_PLUGIN_ROOT}/scripts/orchestrate.sh loop <programme> --tmux \
--every 20m --max-hours 8
| flag | effect |
|---|---|
--every <20m|2h|90s> | cadence, defaults to loop.every in programme.yaml |
--max-ticks N | stop after N ticks |
--max-hours N | stop after N hours |
--tick-timeout S | seconds one tick may take before it is stopped and the loop moves on. Defaults to twice the cadence. Without it a wedged tick hangs the loop and STOP never gets read |
--observe | every tick classifies and reports, and sends, restarts and creates nothing. Use it to watch a programme without touching it |
--tmux | run detached in a session named orchestrate-<programme> |
--agent-cmd "<cmd>" | feed assets/tick-prompt.md to a headless agent each tick instead of running the mechanical tick alone |
The judgment half of a tick needs an agent, so a driver with no --agent-cmd
does the mechanical half only. To get a full tick unattended:
orchestrate.sh loop <programme> --tmux --every 20m \
--agent-cmd 'codex exec -' # or: agy --print
touch ~/.claude/orchestrator/<programme>/STOP
The loop ends at the next check and records why. STOP is read before each tick,
after each tick and during the wait between them, so it works even when a tick
has just been stopped for running long. A STOP already present makes
loop refuse to arm, so remove it before restarting. To stop the tmux driver
directly, kill that one session by its exact name:
tmux kill-session -t orchestrate-<programme>. Never a bulk or server-level
kill, never pkill.
The per-tick bound stops the TICK, not necessarily everything the tick started:
an --agent-cmd that forks leaves its children running. Prefer a command that
exits cleanly, and check for strays after a run that timed out.
max-ticks, max-hours, and the exit expression in programme.yaml turning
true. Each records a loop event with its reason, so the next orchestrator can
see why it ended.
What SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/adoptIndex the agent lanes that already exist into a programme's lanes.jsonl, reading each terminal to classify it and its context use. Use when taking charge of lanes started by hand, when starting a programme from running work, or as the re-verify pass after a host restart or before any send. Dry-run first, confirm once, then write./discoverList the Orca environments, hosts, worktrees and terminals a programme could use, and say which environments are unreachable. Use before adopting or spawning lanes, when a host may have restarted, when "what is running where" is unclear, or when a remote environment looks down. Asks Orca only, never ssh./handoverGenerate HANDOVER.md from a programme's index files and release the owner lock so another session, on any harness, can pick the programme up. Use when credits or context are running out, when asked to stop, when a session is ending, or before switching the orchestrator to a different agent or machine./preflightReport host capacity for a programme: disk free per host, how many lanes each carries, and which metrics rung answered. Use before placing a new lane or when a host looks full. The full metrics ladder, scoring and placement refusals are cut 2; this ships the probe rung and the recorded floors only./retireRemove a finished lane's worktree through Orca, only once it is merged, clean and idle. Use when a lane's work has landed and its worktree is just taking disk, or at a programme's exit condition. Refuses on anything still working, still holding an open PR, or still showing a live agent./spawnStart a new agent lane on a chosen host with a worktree, an agent and a goal, then index it. Placement scoring is cut 2; this describes the manual path that produces the same indexed result, so no lane is ever started without being recorded.Other plugins' skills for the same job
npx claudepluginhub stevengonsalvez/ainb-toolkit --plugin orchestrate