pub enum RunStatus {
NotStarted,
Running,
AwaitingModel,
AwaitingTool,
Suspended {
reason: String,
input_schema: Value,
},
BudgetExceeded {
budget: Budget,
observed: f64,
},
NeedsReconciliation,
Completed {
output: Value,
},
Failed {
error: String,
},
Abandoned {
reason: Option<String>,
unresolved_write: Option<UnresolvedWrite>,
},
}Expand description
Where a run stands, as derived from its log alone.
Variants§
NotStarted
The log is empty: nothing has been recorded yet.
Running
The run is between recorded steps and can continue.
AwaitingModel
A model call intent is recorded with no completion. The call can be re-issued.
AwaitingTool
A read or idempotent tool intent is recorded with no completion. The call can be re-executed (reads freely, idempotent calls under their recorded key).
Suspended
The run parked awaiting input. Carries what a resume needs: why it parked and the schema the input must satisfy.
Fields
BudgetExceeded
A declared budget was crossed and the run parked. A human can raise the limit and resume.
Fields
NeedsReconciliation
A write intent is recorded with no completion. The write may or may not have happened; only a human may decide what happens next. Never derived as retryable, by design.
Completed
The run finished with this output.
Failed
The run failed with this error.
Abandoned
The run was abandoned by an operator: a terminal resting state in its
own right, distinct from RunStatus::Failed. Abandonment is a
deliberate retirement, not a failure, so it reads as its own muted
terminal everywhere downstream rather than borrowing the failure ink.
Fields
unresolved_write: Option<UnresolvedWrite>The write intent left unsettled when a needs-reconciliation run was
abandoned, when there was one. Present only for a run abandoned from
RunStatus::NeedsReconciliation; the abandonment records it so the
terminal state never claims the write question was answered.