pub enum LoopError {
ProviderFailure(Box<ProviderFailure>),
InvalidState(String),
Cancelled,
ContextRecoveryDeadlineExceeded,
Provider(String),
Tool(ToolError),
Mutator(String),
Unsupported(String),
}Expand description
Errors that can occur while driving the agent loop.
Variants§
ProviderFailure(Box<ProviderFailure>)
Typed, sanitized model failure with retry accounting.
InvalidState(String)
The driver was in an unexpected state for the requested operation.
Cancelled
The current turn was cancelled via the CancellationHandle.
ContextRecoveryDeadlineExceeded
The absolute context-recovery budget expired.
Provider(String)
An error originating from the model provider.
Tool(ToolError)
An error originating from tool execution.
Mutator(String)
An error reported by a LoopMutator (compaction, redaction, repair).
Unsupported(String)
The requested operation is not supported.
Implementations§
Source§impl LoopError
impl LoopError
Sourcepub fn is_context_length_exceeded(&self) -> bool
pub fn is_context_length_exceeded(&self) -> bool
True only for structured, confirmed upstream context-length rejection. Only the exact typed code is accepted; error types, messages, generic client errors, cancellation, and replay-unsafe failures are ignored.
Sourcepub fn provider_failure(&self) -> Option<&ProviderFailure>
pub fn provider_failure(&self) -> Option<&ProviderFailure>
Returns structured provider metadata without parsing a rendered error.
Trait Implementations§
Source§impl Error for LoopError
impl Error for LoopError
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()