#[non_exhaustive]pub enum ErrorKind {
Show 59 variants
ParseError,
InvalidRequest,
NotInitialized,
AlreadyInitialized,
MethodNotFound,
InvalidParams,
ExperimentalRequired,
Internal,
PageEventTooLarge,
OutputResultTooLarge,
Overloaded,
InputTooLarge,
CapabilityRequired,
NotFound,
Interrupted,
Cancelled,
SessionNotFound,
SessionInUse,
SessionAmbiguous,
ForkBoundaryInvalid,
SessionNotLoaded,
SessionStreamMismatch,
DaemonDraining,
LimitsAboveMax,
WorkspaceNotTrusted,
CommandRejected,
Backpressured,
SkillNotFound,
ComputerUseUnavailable,
MarketplaceNotFound,
PluginNotFound,
MarketplaceAlreadyExists,
PluginMutationsDisabled,
UploadNotFound,
ViewTruncated,
OutputUnavailable,
BoundaryPruned,
BoundaryUnusable,
NoBoundary,
ApprovalNotFound,
ApprovalAlreadyResolved,
ApprovalChoiceInvalid,
ApprovalRequirementStale,
ApprovalReviewerUnavailable,
UserInputNotFound,
UserInputAlreadySettled,
UserInputAnswerInvalid,
MissingAnchor,
PrunedPrefix,
WrongStream,
UnknownStream,
UnknownProjection,
AdmissionNotFound,
AdmissionAlreadyResolved,
AdmissionChoiceInvalid,
UsageRefreshRateLimited,
UsageRefreshUnavailable,
UsageRefreshFailed,
Unrecognized,
}Expand description
A stable error.data.kind category: camelCase, the value clients branch on.
Open: new kinds are added as their methods land, and a new kind is
additive only because this domain is declared open.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ParseError
Line was not valid JSON (-32700); id is null.
InvalidRequest
Valid JSON, invalid frame (-32600).
NotInitialized
Pre-handshake request other than initialize (-32600 override).
AlreadyInitialized
Second initialize on one connection (-32600 override).
MethodNotFound
Unknown method (-32601).
InvalidParams
Malformed params (-32602).
ExperimentalRequired
Experimental method, field, or variant without the experimentalApi
opt-in.
Internal
Unexpected server failure (-32603).
PageEventTooLarge
One durable view event cannot fit the configured page-result budget
(-32603 override); sessionId, viewCursor, and limitBytes name
the blocked range and budget.
OutputResultTooLarge
A bounded item/readOutput result cannot fit the configured result
budget even at zero progress (-32603 override); sessionId and
limitBytes name the session and exceeded budget.
Overloaded
Ingress queue saturated (-32001); retry with backoff and jitter.
InputTooLarge
Frame or params over the limit (-32002); data.limitBytes present.
CapabilityRequired
Capability-gated method without the grant (-32010);
data.capability names it.
NotFound
Run, item, subscription, or cursor anchor missing (-32011); a
missing view-cursor anchor sets data.reason: "missingAnchor".
Interrupted
Interrupt pre-empted the request (-32013); outcome on the view.
Cancelled
Cancellation pre-empted the request (-32014); outcome on the view.
SessionNotFound
sessionId resolves to no session on this host; data.sessionId names
the rejected id.
SessionInUse
The session writer lease is held by another host (-32021).
SessionAmbiguous
More than one canonical retained log matches the session (-32022).
ForkBoundaryInvalid
A fork cut names an unknown or non-terminal turn (-32023).
SessionNotLoaded
Session exists but is not loaded on this host; data.sessionId names
the unloaded session.
SessionStreamMismatch
The resolved store’s own stream id is not the requested session: a moved
or renamed session directory whose log belongs to a different session.
data.sessionId names the requested session.
DaemonDraining
A drive-taking verb refused because this daemon is draining on the
binary-change upgrade path; data.paths names the canonical socket to
retry against and data.retryable is true. Experimental tier with the
socket surface.
LimitsAboveMax
A session/start choice is wider than the host ceiling on at least one
axis; data.axes names every too-wide axis with its requested and
ceiling values and data.retryable is false. Experimental tier with
the socket limits surface.
WorkspaceNotTrusted
A worktree action names an untrusted repository; data.path names the
subject repo and data.retryable is false. Experimental tier with the
worktree surface.
CommandRejected
An command id was replayed with a different payload (-32030).
Backpressured
The bounded command-admission queue is full (-32031).
SkillNotFound
A skill selector names no skill in the session’s current user-invocable
catalog; data.sessionId and data.selector name the rejected pair.
Computer use is unavailable on this host: its gate was off when the host
launched, or the host is not macOS. The computerUseSettings/* methods
stay registered and answer this.
MarketplaceNotFound
A plugin verb names no configured marketplace; data.sessionId and
data.name name the rejected pair.
PluginNotFound
The install arm names no plugin in the named store; data.sessionId,
data.marketplace, and data.name name the rejected triple.
MarketplaceAlreadyExists
Marketplace add over an already-configured name; the existing record is
untouched. data.sessionId and data.name name the rejected pair.
PluginMutationsDisabled
The managed policy disables plugin mutation; nothing was touched.
data.sessionId names the acting session.
UploadNotFound
A video input part names an upload id with no completed upload;
data.sessionId and data.uploadId name the rejected pair.
ViewTruncated
The requested range predates the retained view; data.earliestCursor
names the oldest servable position when one exists. Recovery is
session/resume snapshot semantics.
An item/readOutput ref exists but its bytes are not servable;
data.availability carries the durable ToolOutputAvailability,
read-time-derived ("unsupported"/"accessFailed") when the durable
record still says available.
BoundaryPruned
A requested installed boundary has been pruned.
BoundaryUnusable
The installed boundary cannot safely serve the requested read
(-32042 override).
NoBoundary
No installed boundary exists for the requested read
(-32042 override).
ApprovalNotFound
Approval id is unknown (-32050).
ApprovalAlreadyResolved
Approval already has a durable terminal (-32051).
ApprovalChoiceInvalid
Choice or feedback is invalid for this approval (-32052).
ApprovalRequirementStale
Requirement token is not the current stage (-32053).
A protected write has no live reviewer lease (-32054).
UserInputNotFound
User-input prompt id is unknown (-32055).
UserInputAlreadySettled
User-input prompt already has a durable settlement (-32056).
UserInputAnswerInvalid
Structured answer or clarification is invalid (-32057).
MissingAnchor
A raw-log cursor position names no position of the requested stream;
data.stream and data.after name the rejected anchor. Experimental
tier.
PrunedPrefix
A raw-log anchor (or the origin) falls in a retention-pruned prefix;
data.nextAvailable carries the earliest readable position.
Experimental tier.
WrongStream
A raw-log anchor id exists in the session but belongs to a different stream. Experimental tier.
UnknownStream
No such stream in the session. Experimental tier.
UnknownProjection
No such registered projection. Experimental tier.
AdmissionNotFound
Admission id is unknown; data.sessionId and data.admissionId name
the rejected pair. Experimental tier.
AdmissionAlreadyResolved
Decide after the durable terminal; data.admissionId plus the winning
data.admissionResolution, data.retryable: false. Experimental tier.
AdmissionChoiceInvalid
Choice is not among the current availableChoices; data.admissionId
and data.choiceId name the rejected pair. Experimental tier.
UsageRefreshRateLimited
A usage/refresh inside the per-host window; data.retryAfterMs is the
time left, data.retryable: true. Experimental tier.
A usage/refresh on a host with no Meta-account login to mint with.
Experimental tier.
UsageRefreshFailed
A usage/refresh whose mint failed; data.failureKind names the class.
Experimental tier.
Unrecognized
A value from a newer host. The rest of the message still decodes, but the word is not kept, and encoding this variant fails. Never construct it.