pub enum CompletionOutcome {
Completed(Box<RunResult>),
CompletedWithoutResult,
CallbackPending {
tool_name: String,
args: Value,
},
Cancelled,
Abandoned {
reason: String,
error: TurnErrorMetadata,
},
AbandonedWithError {
reason: String,
error: TurnErrorMetadata,
},
CompletedWithFinalizationFailure {
error: TurnErrorMetadata,
},
RuntimeTerminated {
reason: String,
error: TurnErrorMetadata,
},
}Expand description
Outcome delivered to a completion waiter.
Variants§
Completed(Box<RunResult>)
The input was successfully consumed and produced a result.
CompletedWithoutResult
The input was consumed but produced no RunResult (e.g. context-append ops).
CallbackPending
The input reached a callback boundary and requires external tool fulfillment before the turn can continue.
Cancelled
The input reached the canonical cancellation terminal.
Abandoned
The input was abandoned before completing, carrying typed failure
metadata so every surface sees the same structured turn error the
sibling AbandonedWithError carries.
AbandonedWithError
The input was abandoned before completing, with typed failure metadata.
CompletedWithFinalizationFailure
The turn produced output, but a later runtime finalization step (the durable commit) failed, so the run is NOT durably terminal. The produced result is deliberately NOT carried on this outcome: a finalization failure must be treated as failure by every surface, never surfaced as a usable success result (that would be a false belief of success).
Fields
error: TurnErrorMetadataRuntimeTerminated
The runtime was stopped or destroyed while the input was pending, carrying typed failure metadata describing the termination cause.