Skip to content
Docs
Request access

Tasks and gates

Available

Task states and the gate check A task moves from proposed to assigned, in_progress, submitted and verifying. From verifying it becomes done when every required gate passed, goes back to in_progress when a required gate failed and attempts remain, or goes to needs_human when no attempts are left. blocked and cancelled are the other states. proposed assigned in_progress submitted verifying done every required gate passed a required gate failed, attempts remain no attempts left needs_human a decision or an approval is needed A task can also be blocked a budget hard stop or a policy denial cancelled a human rejected it, or the run was stopped proposed assigned in_progress a required gate failed, attempts remain submitted verifying every required gate passed done no attempts left needs_human a decision or an approval is needed A task can also be blocked a budget hard stop or a policy denial cancelled a human rejected it, or the run was stopped
The states of a task. The gate check sits at verifying: it is the only way to done.
Diagram as text
  1. proposed, then assigned, in_progress, submitted and verifying (the gates are running).
  2. Every required gate passed: the task is done.
  3. A required gate failed and attempts remain: back to in_progress, with the failure as feedback.
  4. No attempts left: needs_human.
  5. A task can also be blocked (a budget hard stop or a policy denial) or cancelled (a human rejected it, or the run was stopped).

A run has one goal. The Chief of Staff agent turns the goal into tasks and assigns each one to an agent below it in the organization. A task has a title, instructions, an assignee, a number of allowed attempts and a definition of done.

A task moves through these states:

State Meaning
proposed Created, not yet assigned
assigned A policy allowed it, the agent is eligible and budget is reserved
in_progress The worker is doing the work
submitted The worker returned an output
verifying The gates are running
done Every required gate passed
needs_human A decision or an approval is needed
blocked A budget hard stop or a policy denial
cancelled A human rejected it, or the run was stopped

The rule that matters: a task becomes done only through passed required gates. No code path marks a task done without recorded gate results. The whole run is drawn in How it works.

A definition of done is a list of criteria (plain statements) and gates that check them. At least one gate must be required. The gate kinds are:

Kind What it does
rule A deterministic check on the output (contains, does not contain, matches, length, path checks)
schema The output must match a schema
test_command Run the project’s tests in a sandbox
verifier An independent verifier agent judges the output
human A person approves
custom A gate written with the SDK
  • Cheap gates first. Deterministic gates run before verifier agents, which are slower and cost money. If a cheap required gate fails, the verifier is not paid for.
  • Evidence. A gate result names which criteria it checked and the verdict for each (met or not_met). “Looks good” without evidence fails.
  • Attempts. If a required gate fails and attempts remain, the task goes back to in_progress with the failure as feedback. With no attempts left it goes to needs_human.
  • Everything is recorded. Each gate result is a ledger entry with a hash of the full result and who checked it (gate:rule, gate:test_command, agent:<verifier> or human:<id>).

Was this page helpful?