Reference Search docs

Errors & codes

Prefer stable codes over string matching. Map adapter errors at package boundaries. Do not leak SQL, filesystem paths, or secret material into app-facing errors.

Shape conventions

Errors that cross a boundary should carry:

FieldRole
codeStable SCREAMING_SNAKE or dotted machine code
messageHuman-safe summary (no secrets)
retryableExplicit when known (do not infer from message)
cause chainInternal only; strip before external MCP/CLI if sensitive

Parse-don’t-validate constructors throw typed parse errors (CoreParseError, EffectValidationError, …) rather than returning “maybe invalid” DTOs.

EventStore / storage

CodeMeaningTypical retry
OPTIMISTIC_SEQUENCE_CONFLICTStale expectedSeqYes — reload stream
STALE_FENCEFence below owner_epochNo as OCC retry
MISSING_FENCEUnfenced write to fenced streamNo — acquire lease
CHECKPOINT_REGRESSIONNon-monotonic checkpointNo
UNSUPPORTED_SCHEMA_VERSIONDB newer than codeNo — upgrade binary
MIGRATION_FAILUREMigrate failedNo until fixed
STREAM_INTEGRITYNoncontiguous / head mismatchNo
UNSUPPORTED_CODECUnknown payload codecNo
PERSISTENCE_UNAVAILABLEe.g. OPFS required but missingNo / change mode
SQLITE_BUSYBusy timeoutMaybe — backoff
SNAPSHOT_AHEADSnapshot seq > headNo
STORAGE_WORKER_TERMINATEDWorker crashRestart worker

Aggregates

CodeMeaningRetry?
AGGREGATE_CONFLICTOCC / concurrent writersYes — reload & retry
AGGREGATE_INVARIANTBusiness rule rejectNo
Stale fence surfaced at aggregateLost leaseNo blind retry

Resilience failure classes

ClassRetry via ResilienceProfile?
transientYes (within profile)
policy.DecidedNever
terminalNever
cancellationNever
deadlinePolicy-dependent; not infinite retry

Contracts / Gatekeeper

Compatibility and gate denials surface as structured reasons (MachineReadableReason with gate: contracts | policy | obligations | cost | effects | resilience), not only thrown exceptions. CLI/MCP should print reason codes agents can act on.

Identity / config

Prefer ref-safe messages (“resolution rank failed at provider-federation”) over embedding token fragments. Static-escape expiry is a hard fail, not a silent fallback to plaintext.

CI fleet

Why a runner provider was not chosen for a job. Fleet balancing returns one of these for every provider it skips; a pricing or budget refusal carries that engine’s own code behind a pricing. or budget. prefix.

CodeMeaningTypical retry
fleet.disabledThe provider is not enabled in policyNo: enable the provider
fleet.unhealthyThe provider’s host is critically short of a resourceYes, when the host recovers
fleet.label-boundThe job is already queued on a label this provider does not serveNo: the label is fixed once queued
fleet.visibilityThe provider does not serve this repository’s visibility, or public repositories are not turned on thereNo: a fact about the provider
fleet.organization-onlyThe provider serves organization-owned repositories onlyNo: a fact about the provider
fleet.dockerThe job needs Docker and the provider has noneNo: a fact about the provider
fleet.forkThe provider does not run jobs from forksNo: a fact about the provider
fleet.isolationThe job needs its own machine and this provider is sharedNo: a fact about the provider
fleet.machineThe job needs more CPU or memory than this provider’s machine class hasNo: a fact about the machine class
fleet.runtimeThe job’s reserved minutes exceed the longest the provider lets one machine runNo: a fact about the provider
fleet.capacityEvery slot is in useYes, when a slot frees
fleet.agreement.new-deniedPlacing the job would open a new paid planNo: open the plan, or allow it
fleet.payer-budgetThe job would exceed the operator’s ceiling for that provider accountNo: raise the ceiling or wait for the period
fleet.account-budgetThe job would exceed the account’s ceilingNo: raise the ceiling or wait for the period

EventStore · Effects · ActorHost · Contracts