#[non_exhaustive]pub enum LoopError {
AwaitingApproval(Box<ApprovalNeeded>),
Journal(String),
PinMismatch(String),
Indeterminate {
tool: String,
call_id: String,
},
Model(ModelError),
Fatal {
tool: String,
message: String,
},
TurnLimit(usize),
Cancelled,
Budget(Exhausted),
EmptyAnswer {
finish_reason: Option<String>,
},
AmbiguousCalls {
id: String,
},
TooLarge {
bytes: usize,
limit: usize,
},
}tool-loop only.Expand description
Why a run produced no answer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AwaitingApproval(Box<ApprovalNeeded>)
The run is parked on a call a person has to approve; it is not a
failure, and the executor ends the turn input-required.
Journal(String)
The run journal could not be read or written, or was not what the run needed. The run stopped before the step it could not record.
PinMismatch(String)
A run begun with one model, tool set or configuration was asked to continue under another.
Indeterminate
A call may have run before the replica died, and this loop cannot safely run it again: its idempotency secret was not set explicitly, so its key would differ on this replica.
Model(ModelError)
The model provider failed a turn.
Fatal
A tool returned ToolError::Fatal.
TurnLimit(usize)
The model asked for tools on every one of this many turns.
Cancelled
The cancellation token fired.
Budget(Exhausted)
The caller’s budget ran out: its deadline passed, or the model’s
reported usage spent the TOKENS_METER (ADR 0023).
EmptyAnswer
The model’s final reply had no text: it was empty, or only whitespace. The usual cause is a reply cut at the output limit before the model had written anything, as a reasoning model whose limit goes on thinking does.
Fields
AmbiguousCalls
The model’s reply named two calls with one id, so no result could be told apart from the other’s; no call in it was run (adversarial review N08, 2026-11-13).
TooLarge
What the run would have sent the model was past the loop’s request limit, and was not sent (adversarial review N09, 2026-11-13).
Trait Implementations§
impl Eq for LoopError
Source§impl Error for LoopError
impl Error for LoopError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for LoopError
Auto Trait Implementations§
impl Forget for LoopError
impl Freeze for LoopError
impl Move for LoopError
impl RefUnwindSafe for LoopError
impl Send for LoopError
impl Sync for LoopError
impl Unpin for LoopError
impl UnsafeUnpin for LoopError
impl UnwindSafe for LoopError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].