Skip to content

02 · Concepts

What a unit of work in onreel is made of and how the parts fit together.

2.1 · Run

A Run is the central entity of onreel: a graph of tasks executed by agents. A Run keeps a full event journal, accounts for usage and stops at control points where you decide.

A Run is created in one of three modes:

  • llm — a coordinator, which is an agent, creates and hands out tasks. This is the default.
  • workflow — the Run follows the steps of a workflow file; a distribution profile assigns the executors (Agents and manifests).
  • manual — there is no coordinator: you create and start the tasks yourself.

A Run has three statuses: active, completed and cancelled. Only the owner can close a Run as done or as won't-do: onreel run close. Tasks still open at that point move to cancelled.

2.2 · Tasks and attempts

A task is a part of a Run with a five-field specification: Target (where to change), Change (what to do), Constraints, Ownership (whose files) and Acceptance (when it is done). Task statuses are pending, ready, blocked, awaiting_gate, running, in_review, succeeded, failed and cancelled.

An attempt is one agent launch on a task (the commands and the contract call it a Dispatch). The agent works in a terminal and reports once at the end with onreel orch worker_done: success or failure and a short summary. A failed attempt is repeated as a new one with --retry-of <dispatchId>.

A process state that onreel could not confirm is called unknown. It permits nothing: the attempt counts as neither alive nor finished until that is proven.

2.3 · The coordinator and workers

The coordinator is the agent that drives a Run: it creates tasks, starts workers, reads their messages and finishes the Run. It works with the token of its own Run and sees only that Run: other Runs and owner commands are closed to it.

A worker is the agent of one attempt. It talks to the coordinator by messages — status, question, escalation, worker_done — and the coordinator replies with answer and steer. Messages are delivered in batches and count as read only after acknowledgement (onreel orch ack), so a crash does not lose them.

A Run's topology is vertical or team. In team the executors act as team members: each has its own mailbox and takes tasks itself (onreel team …).

2.4 · Worktrees

Every task gets its own git worktree and a branch named onreel/<runId>/<taskId>, so parallel agents do not get in each other's way or in your working directory. By default worktrees live in <project>/.onreel/workspaces/; the location is set in the project settings.

An attempt starts with one of the isolation modes: worktree (the working directory is the task worktree), shared or folder (--cwd sets the working directory).

When a Run is closed, clean worktrees are removed. onreel never deletes uncommitted changes by itself: such a worktree stays on disk until you decide otherwise. A branch that was not merged stays too.

2.5 · Gates and the Inbox

A gate is a control point: the Run stops and waits for a human decision, which is approve or reject. Gate kinds:

  • approval — approve a result or a plan;
  • review — accept the work on a task;
  • permission — allow an action;
  • budget — decide what to do when a budget is exhausted;
  • question — answer an agent's question;
  • manual — a manual point in a workflow.

The Inbox is the single place that collects every open gate and question across all Runs. You can answer from the phone too, if phone access is connected.

2.6 · Budgets

A Run's budget is a set of limits: cost in dollars, tokens, wall-clock time, the number of concurrent attempts and others. Limits are set when the Run is created (--budget) or as defaults for every Run without an explicit budget.

terminal
onreel settings run-limits --cost 5 --wall-clock 2h --max-concurrent 3
onreel run cost --run <runId>

run cost breaks usage down by task, role, class, executor and model.

Usage is not counted for every agent: where there is no data it is marked unknown, numbers are never invented, and token and money budgets do not trigger for such an agent (limitations).

2.7 · Distribution profiles

A distribution profile is the set of rules by which onreel picks agents: who coordinates a Run, which work classes the Run has from light to heavy, who executes each class and who is the fallback when the primary is unavailable. A profile is copied into a Run when it is created, so later edits affect new Runs only.

The built-in profiles are balanced and economy, plus sets for a single vendor (for example claude-only) and combinations of two vendors. You make your own profile from a built-in one: onreel profile show, edit the JSON, then onreel profile set --file.