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

  1. Validate all Harness IR bindings.
  2. Emit run.created and harness.resolved.
  3. Resolve declared context providers.
  4. Call the model with objective, protocol, context, observations, and known artifacts.
  5. If the model proposes an action:
    1. Ensure the capability was declared by the harness.
    2. Evaluate every declared policy.
    3. Deny, request approval, or execute.
    4. Append observations/artifacts.
    5. Continue.
  6. If the model proposes final output:
    1. Execute every declared verifier.
    2. If all pass, complete.
    3. If any fail, feed structured failure back into the next turn if budget remains.
    4. If verification is uncertain/human-required, stop automatic completion.
  7. 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.