#[non_exhaustive]pub enum ErrorCode {
Show 50 variants
TypesInvalidId,
TypesValidation,
TypesSerde,
ToolNotFound,
ToolInvalidArgs,
ToolExecution,
ToolTimeout,
ToolCancelled,
ToolDenied,
ToolApprovalDenied,
ToolStreamProtocol,
ToolRateLimited,
ToolConcurrencyLimit,
ToolNetwork,
ToolServiceUnavailable,
LlmProvider,
LlmCancelled,
LlmInvalidResponse,
LlmAuth,
LlmRateLimit,
LlmIdleTimeout,
LlmEmptyResponse,
LlmTruncated,
AgentInvalidDefinition,
AgentBuild,
AgentNotFound,
RuntimeMaxSteps,
RuntimeCancelled,
RuntimeGate,
RuntimeStructuredOutput,
RuntimeDeadline,
RuntimeStationarity,
HostSpawn,
HostBudget,
HostDepth,
HostConcurrency,
HostUnsupported,
HostCancelled,
HostIsolation,
WorkflowScript,
WorkflowDivergence,
WorkflowJournal,
WorkflowBudget,
WorkflowCancelled,
WorkflowValidate,
StateInvariant,
StatePersistence,
CompactionFailed,
CompactionOverflow,
Internal,
}Expand description
Machine-stable error code for control-plane handling.
Codes use dotted domain.reason strings via ErrorCode::as_str.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TypesInvalidId
Invalid or empty identifier.
TypesValidation
Message or payload failed validation.
TypesSerde
Serialization failure.
ToolNotFound
Tool not found in registry.
ToolInvalidArgs
Tool arguments failed schema/parse.
ToolExecution
Tool execution failed.
ToolTimeout
Tool timed out.
ToolCancelled
Tool cancelled.
ToolDenied
Tool denied by policy/capability.
ToolApprovalDenied
Tool call rejected by approval gate.
ToolStreamProtocol
Tool stream ended without a terminal item (protocol violation).
ToolRateLimited
Tool rate limited by upstream service.
ToolConcurrencyLimit
Tool concurrency limit exceeded.
ToolNetwork
Tool network failure.
Tool upstream service unavailable.
LlmProvider
LLM transport or provider failure.
LlmCancelled
LLM request cancelled.
LlmInvalidResponse
LLM response invalid.
LlmAuth
LLM authentication / authorization failure.
LlmRateLimit
LLM rate limited.
LlmIdleTimeout
Stream/sample idle timeout between chunks.
LlmEmptyResponse
Provider returned an empty completion (no text / tool calls).
LlmTruncated
Output truncated (max tokens / length limit).
AgentInvalidDefinition
Agent definition invalid.
AgentBuild
Agent build failure.
AgentNotFound
Agent type / definition not found for resolution.
RuntimeMaxSteps
Turn hit max steps.
RuntimeCancelled
Turn cancelled.
RuntimeGate
Runtime gate rejected the outcome.
RuntimeStructuredOutput
Structured output failed schema validation after retries.
RuntimeDeadline
Turn deadline exceeded.
RuntimeStationarity
Identical tool calls repeated past the stationarity hard stop.
HostSpawn
Host spawn failed.
HostBudget
Agent budget exhausted.
HostDepth
Nested spawn depth exceeded.
HostConcurrency
Concurrent nested agent cap exceeded.
HostUnsupported
Host capability unsupported.
HostCancelled
Host cancelled.
HostIsolation
Isolation backend failure.
WorkflowScript
Workflow script compile/runtime failure.
WorkflowDivergence
Journal divergence on resume.
WorkflowJournal
Journal I/O or integrity failure.
WorkflowBudget
Workflow agent budget exceeded.
WorkflowCancelled
Workflow cancelled.
WorkflowValidate
Workflow validation / probe failure.
StateInvariant
Conversation state invariant violated (e.g. dangling tool call).
StatePersistence
Persistence backend I/O failure.
CompactionFailed
Compaction strategy failed.
CompactionOverflow
Context still exceeds limits after compaction.
Internal
Generic internal failure.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const fn default_retry(self) -> RetryClass
pub const fn default_retry(self) -> RetryClass
Default retry classification for this code.
Kernel paths set an explicit RetryClass when they know more; this
is the baseline hosts may consult.