pub enum SubAgentError {
Show 16 variants
Parse {
path: String,
reason: String,
},
Invalid(String),
NotFound(String),
Spawn(String),
ConcurrencyLimit {
active: usize,
max: usize,
},
Cancelled,
InvalidCommand(String),
Transcript(String),
AmbiguousId(String, usize),
StillRunning(String),
Memory {
name: String,
reason: String,
},
Io {
path: String,
reason: String,
},
Llm(String),
Channel(String),
TaskPanic(String),
MaxDepthExceeded {
depth: u32,
max: u32,
},
}Expand description
All errors that can arise during sub-agent lifecycle operations.
SubAgentError is the single error type for the entire zeph-subagent crate.
Every fallible public function returns Result<_, SubAgentError>.
§Examples
use zeph_subagent::{SubAgentDef, SubAgentError};
let err = SubAgentDef::parse("missing frontmatter").unwrap_err();
assert!(matches!(err, SubAgentError::Parse { .. }));Variants§
Parse
Frontmatter parsing failed (malformed YAML/TOML or missing delimiters).
Invalid(String)
Definition semantics are invalid (e.g. empty name, conflicting tool policies).
NotFound(String)
No definition or running agent with the requested name or ID was found.
Spawn(String)
The background task could not be spawned (OS or tokio error).
ConcurrencyLimit
The manager’s concurrency limit is exhausted; no new agents can be spawned.
Cancelled
The agent loop was cancelled via its tokio_util::sync::CancellationToken.
InvalidCommand(String)
A slash-command string (/agent, /agents) could not be parsed.
Transcript(String)
An I/O operation on a transcript file failed.
AmbiguousId(String, usize)
An ID prefix matched more than one transcript; provide a longer prefix.
StillRunning(String)
Resume was requested for an agent that is still running.
Memory
A memory directory could not be created or resolved.
Io
A filesystem I/O error unrelated to transcripts.
Llm(String)
The underlying LLM provider returned an error during the agent loop.
Channel(String)
A channel send (status watch, secret approval) failed.
TaskPanic(String)
The tokio task panicked and the join handle propagated the panic.
MaxDepthExceeded
The recursion depth for nested sub-agent spawning exceeded the configured limit.
Trait Implementations§
Source§impl Debug for SubAgentError
impl Debug for SubAgentError
Source§impl Display for SubAgentError
impl Display for SubAgentError
Source§impl Error for SubAgentError
impl Error for SubAgentError
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()
Auto Trait Implementations§
impl Freeze for SubAgentError
impl RefUnwindSafe for SubAgentError
impl Send for SubAgentError
impl Sync for SubAgentError
impl Unpin for SubAgentError
impl UnsafeUnpin for SubAgentError
impl UnwindSafe for SubAgentError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.