Akashik Protocol
Specification v0.1.0-draft

Error Model

All error codes, conditions, and recovery guidance.

Error Response Format

Every error response from the Field uses this structure:

{
  "code": "<ErrorCode>",
  "message": "<string>",
  "operation": "<OperationType>",
  "recoverable": "<boolean>",
  "suggested_action": "<string | null>"
}
FieldDescription
codeMachine-readable error code.
messageHuman-readable description of what went wrong.
operationThe operation that triggered the error.
recoverableWhether the caller can retry or correct and re-submit.
suggested_actionOptional guidance on how to recover.

Validation Errors

Errors caused by invalid or missing fields in the request payload.

CodeDescriptionRecoverable
MISSING_INTENTRECORD submitted without intent.purposeYes — resubmit with intent
MISSING_CONFIDENCECommitted RECORD at Level 1+ without confidence.score or confidence.reasoningYes — resubmit with confidence
INVALID_CONFIDENCEconfidence.score is outside the 0.0–1.0 rangeYes — correct and resubmit
INVALID_TYPEUnknown or unsupported MemoryType valueYes — use a supported type
AGENT_NOT_REGISTEREDOperation submitted by an agent that hasn't called REGISTERYes — call REGISTER first
AGENT_ID_TAKENREGISTER requested with an id already in useYes — choose a different ID
CONFLICT_NOT_FOUNDMERGE references a conflict that doesn't existNo
UNIT_NOT_FOUNDDETECT or REPLAY references a unit that doesn't existNo
INVALID_TRANSITIONA state machine transition was attempted from an invalid current stateYes — check current state first
UNSUPPORTED_OPERATIONThe operation is not supported at this Field's conformance levelNo

Operational Errors

Errors caused by infrastructure or processing failures after a valid request was received.

CodeDescriptionRecoverable
ENRICHMENT_FAILEDEmbedding generation or enrichment failed; unit committed as pending_enrichmentYes — unit is still committed; enrichment will retry
DETECTION_TIMEOUTConflict detection timed out; unit committed but detection deferredYes — call DETECT manually
MERGE_FAILEDConflict resolution failed (e.g., vote did not reach quorum)Yes — retry with a different strategy
REPLAY_TOO_LARGEReasoning chain is too large to reconstruct in a single responseYes — use summary or detailed depth
STORAGE_FULLPersistence store is at capacityNo — run COMPACT or expand storage capacity

System Errors

Errors caused by unrecoverable system conditions.

CodeDescriptionRecoverable
EPOCH_OVERFLOWThe logical clock has overflowed its integer rangeNo — requires system restart with a checkpoint
INTERNAL_ERRORAn unexpected internal failure occurredNo

Partial Failure Semantics

Some operations may partially succeed. The Field uses specific conventions to communicate this:

RECORD with enrichment failure:

{
  "status": "accepted",
  "memory_unit_id": "mem-abc",
  "epoch": 5,
  "conflicts_detected": [],
  "warnings": [{ "code": "ENRICHMENT_FAILED", "message": "Embedding generation failed. Unit committed as pending_enrichment." }]
}

RECORD with conflict detection timeout:

{
  "status": "accepted",
  "memory_unit_id": "mem-abc",
  "epoch": 5,
  "conflicts_detected": [],
  "conflict_detection": "deferred"
}

In both cases the memory unit is committed — the partial failure only affects enrichment or detection, not persistence.