pub enum AgentError {
SessionNotFound(String),
LLM(String),
LLMOverflow(String),
StreamTimeout(String),
Tool(String),
HookSuspended(String),
Budget(String),
Cancelled,
WorkerUnresponsive(String),
}Expand description
Errors that can occur during agent operations
Variants§
SessionNotFound(String)
Session with the specified ID was not found
LLM(String)
Error from LLM provider (API error, network error, etc.)
LLMOverflow(String)
LLM request exceeded provider context/input limits and requires host-side overflow recovery before retry.
StreamTimeout(String)
An LLM stream watchdog expired. The attached diagnostic identifies
whether transport liveness, first semantic output, or midstream semantic
progress stalled. Kept distinct from LLM so generic retry logic cannot
replay partial output or tool-call state (#618).
Tool(String)
Error during tool execution
HookSuspended(String)
A lifecycle hook deliberately suspended this activation. The outer runner converts this control signal into a normal persisted suspension.
Budget(String)
Token budget exceeded error
Cancelled
Agent execution was cancelled by user
WorkerUnresponsive(String)
An actor child worker produced no first frame within the deadline — it is presumed dead (e.g. a pooled worker that exited after its liveness check but before handling the Run). Signals the runner to reap it and retry on a fresh worker, rather than waiting forever on a queued Run nobody serves.
Implementations§
Source§impl AgentError
impl AgentError
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns true if this error represents a user-initiated cancellation.
Prefer this over substring-matching the error message: a reworded or localized message must not silently break cancellation/terminal-status logic.
Sourcepub fn is_hook_suspended(&self) -> bool
pub fn is_hook_suspended(&self) -> bool
Returns true when a lifecycle hook intentionally suspended the run.
Trait Implementations§
Source§impl Debug for AgentError
impl Debug for AgentError
Source§impl Display for AgentError
impl Display for AgentError
Source§impl Error for AgentError
impl Error for AgentError
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()