Runtime State Machine
States
The public RunStatus intentionally describes externally meaningful states rather than every
internal function call:
Running
AwaitingApproval
Completed
Failed
The event stream gives finer detail.
Canonical loop
- Validate all Harness IR bindings.
- Emit
run.createdandharness.resolved. - Resolve declared context providers.
- Call the model with objective, protocol, context, observations, and known artifacts.
- If the model proposes an action:
- Ensure the capability was declared by the harness.
- Evaluate every declared policy.
- Deny, request approval, or execute.
- Append observations/artifacts.
- Continue.
- If the model proposes final output:
- Execute every declared verifier.
- If all pass, complete.
- If any fail, feed structured failure back into the next turn if budget remains.
- If verification is uncertain/human-required, stop automatic completion.
- Fail when the step budget is exhausted.
Important non-goals
- no hidden recursive agent creation;
- no implicit tool access;
- no automatic capability discovery during a run;
- no model-controlled policy bypass;
- no "final answer = success" shortcut.