pub enum StopCause {
Completed,
MaxTurns,
OutputTokenBudget,
CostBudget,
Interrupted,
Loop,
NoOutput,
}Expand description
Why the loop stopped. Completed is the model deciding it was done;
everything else is the harness cutting it short.
Variants§
Completed
MaxTurns
OutputTokenBudget
CostBudget
Interrupted
Someone cancelled it — a user pressing Ctrl-C, a shutdown, a timeout.
Loop
The model repeated an identical tool call, with an identical result,
right after a compaction — the sign that compaction did not carry the
task and the run is stuck re-living it. Distinct from MaxTurns on
purpose: “hit the turn limit” reads as the task being too big, when a
stuck run is a different problem with a different fix.
NoOutput
The model returned turns with no content at all — no text, no tool
calls — and did not recover when asked to answer. A thinking model does
this when the whole per-turn budget goes to reasoning and the answer
never starts; the provider reports max_tokens, or even stop, with an
empty message.
Distinct from Completed for the reason Loop is distinct from
MaxTurns: this used to report success. A run that produced nothing
returned StopCause::Completed with exhausted: false, so it was
indistinguishable from a model that finished and had nothing to say —
which is how it went unnoticed until it accounted for 15 of 28
Terminal-Bench trials, every one of them scored as an ordinary failure.
Implementations§
Trait Implementations§
impl Copy for StopCause
Source§impl<'de> Deserialize<'de> for StopCause
impl<'de> Deserialize<'de> for StopCause
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StopCause
impl StructuralPartialEq for StopCause
Auto Trait Implementations§
impl Freeze for StopCause
impl RefUnwindSafe for StopCause
impl Send for StopCause
impl Sync for StopCause
impl Unpin for StopCause
impl UnsafeUnpin for StopCause
impl UnwindSafe for StopCause
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.