#[non_exhaustive]pub enum ErrorCode {
Show 46 variants
ParseError,
InvalidRequest,
MethodNotFound,
InvalidParams,
Internal,
Overloaded,
InputTooLarge,
CapabilityRequired,
NotFound,
Interrupted,
Cancelled,
SessionNotFound,
SessionInUse,
SessionAmbiguous,
ForkBoundaryInvalid,
SessionNotLoaded,
SessionStreamMismatch,
WorkspaceNotTrusted,
CommandRejected,
Backpressured,
SkillNotFound,
ComputerUseUnavailable,
MarketplaceNotFound,
PluginNotFound,
MarketplaceAlreadyExists,
PluginMutationsDisabled,
UploadNotFound,
ViewTruncated,
OutputUnavailable,
Boundary,
ApprovalNotFound,
ApprovalAlreadyResolved,
ApprovalChoiceInvalid,
ApprovalRequirementStale,
ApprovalReviewerUnavailable,
UserInputNotFound,
UserInputAlreadySettled,
UserInputAnswerInvalid,
MissingAnchor,
PrunedPrefix,
WrongStream,
UnknownStream,
UnknownProjection,
AdmissionNotFound,
AdmissionAlreadyResolved,
AdmissionChoiceInvalid,
}Expand description
The v1 error codes enrolled in the public bundle.
Enrolment tracks what the BINARY can emit, not what the bundle’s method
index has reached: the protocol spec makes the export exact for the binary
that produced it, so a code a v1 host puts on the wire is enrolled here even
while its method’s params/result types are still pending. The
-32060…-32069 the protocol spec block stays out because it is deferred
whole and a v1 host never emits it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ParseError
-32700 — unparseable line.
InvalidRequest
-32600 — invalid frame or handshake ordering.
MethodNotFound
-32601 — unknown or ungated-experimental method.
InvalidParams
-32602 — malformed params or ungated-experimental field/variant.
Internal
-32603 — unexpected server failure.
Overloaded
-32001 — ingress saturated.
InputTooLarge
-32002 — frame or params over the limit.
CapabilityRequired
-32010 — missing capability grant.
NotFound
-32011 — run/item/subscription/cursor anchor missing.
Interrupted
-32013 — user interrupt pre-empted the request.
Cancelled
-32014 — cancellation pre-empted the request.
SessionNotFound
-32020 — no log resolves for sessionId.
SessionInUse
-32021 — writer lease held by another process.
SessionAmbiguous
-32022 — multiple canonical logs for the id.
ForkBoundaryInvalid
-32023 — cutPoint.lastTurnId unknown or in-progress.
SessionNotLoaded
-32024 — log exists but the session is not loaded on this host.
SessionStreamMismatch
-32025 — the store’s own stream id is not the requested session
(a moved or renamed session directory).
WorkspaceNotTrusted
-32029 — a worktree action names an untrusted repository.
CommandRejected
-32030 — durable runtime rejection; data.reason is snake_case.
Backpressured
-32031 — command-admission queue full; data.capacity present.
SkillNotFound
-32032 — the skill selector names no user-invocable skill in this
session’s catalog.
-32033 — computer use is unavailable on this host.
MarketplaceNotFound
-32034 — the plugin verb names no configured marketplace.
PluginNotFound
-32035 — the install arm names no plugin in the named store.
MarketplaceAlreadyExists
-32036 — marketplace add over an already-configured name.
PluginMutationsDisabled
-32037 — the managed policy disables plugin mutation.
UploadNotFound
-32038 — a video input part names an upload id with no completed
upload.
ViewTruncated
-32040 — requested range predates the retained view.
-32041 — an item/readOutput ref exists but its bytes are not
servable; data.availability carries the durable
ToolOutputAvailability.
Boundary
-32042 — installed boundary pruned, unusable, or absent.
ApprovalNotFound
-32050 — approvalId names no approval record in this session.
ApprovalAlreadyResolved
-32051 — decide after the durable terminal.
ApprovalChoiceInvalid
-32052 — choiceId is not among the current availableChoices.
ApprovalRequirementStale
-32053 — requirementId is not the current requirement.
-32054 — protected-write decision with no live reviewer.
UserInputNotFound
-32055 — userInputId names no prompt in this session.
UserInputAlreadySettled
-32056 — answer/cancel/clarify after settlement.
UserInputAnswerInvalid
-32057 — answers do not match the prompt’s questions or bounds.
MissingAnchor
-32060 — cursor anchor names no position of the requested stream.
PrunedPrefix
-32061 — anchor (or origin) falls in a retention-pruned prefix.
WrongStream
-32062 — anchor id belongs to a different stream of the session.
UnknownStream
-32063 — stream not present in the session.
UnknownProjection
-32064 — projection name not registered.
AdmissionNotFound
-32070 — admissionId names no admission record in this session.
AdmissionAlreadyResolved
-32071 — decide after the durable terminal.
AdmissionChoiceInvalid
-32072 — choiceId is not among the current availableChoices.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const ALL: [Self; 46]
pub const ALL: [Self; 46]
Every code enrolled in the public bundle, in the protocol spec order: the 37 stable rows plus the 5 experimental the protocol spec rows, the experimental row, and the 3 experimental a tracked change rows, which render only in the experimental bundle.
Sourcepub const fn override_kinds(self) -> &'static [ErrorKind]
pub const fn override_kinds(self) -> &'static [ErrorKind]
Kinds that override the primary on this code: handshake-ordering
overrides on -32600, the experimental gate on -32601/-32602, the
permanent page/output budget residuals on -32603, and the
unusable/absent boundary arms on -32042.
Sourcepub const fn retryable(self) -> Option<bool>
pub const fn retryable(self) -> Option<bool>
Whether a retry can succeed. None for the pre-emption codes, where
retry is not applicable — the outcome arrives on the view stream.
Sourcepub const fn is_experimental(self) -> bool
pub const fn is_experimental(self) -> bool
Whether this row renders only in the experimental bundle.