Skip to content

Statuses and error codes

For what an agent should do with each of these, see Handle every outcome.

Status Final Meaning
pending_approval No Accepted and held for a person. Nothing has run
executing No Steps are running, or queued to start
compensating No A step failed and completed steps are being undone
succeeded Yes Every step ran
rejected Yes Refused before any step ran
failed Yes Stopped, and no step had taken effect
rolled_back Yes A step failed, and every earlier effect was undone
needs_intervention No Frozen until an operator acts
resolved_manually Yes An operator closed it after fixing the systems by hand

pending, executing, succeeded, failed, unknown, compensating, compensated, compensation_failed, skipped.

poll_after_s is 5 while executing or compensating, 30 while pending_approval, and 300 while needs_intervention.

“Retryable” means the same input may succeed if submitted again later. “After acceptance” codes appear in the execution’s result and have no HTTP status of their own.

Code Stage Retryable HTTP
LICENSE_EXPIRED admission Yes 503
PAUSED admission or execution Yes 503
PRINCIPAL_SUSPENDED admission or execution No 403
RATE_LIMITED admission Yes 429
UNKNOWN_INTENT validation No 422
INTENT_DISABLED admission or execution Yes 503
IDEMPOTENCY_KEY_MISSING validation No 400
IDEMPOTENCY_KEY_REUSED validation No 422
SCHEMA_VIOLATION validation or execution No 422
PLAN_INVALID validation No 422
UNKNOWN_EXECUTION validation No 404
NOT_CANCELLABLE validation No 409
FACT_UNAVAILABLE policy Yes 503
POLICY_ERROR policy No 403
POLICY_DENIED policy No 403
APPROVAL_DENIED approval No After acceptance
APPROVAL_EXPIRED approval No After acceptance
APPROVAL_SCOPE_EXCEEDED approval No After acceptance
CANCELLED approval No After acceptance
DOWNSTREAM_REJECTED execution No After acceptance
DOWNSTREAM_UNAVAILABLE execution Yes After acceptance
DOWNSTREAM_OUTCOME_UNKNOWN execution No After acceptance

These answer people and tools on the operator API, and never reach an agent.

Code Meaning
APPROVAL_NOT_PENDING The approval has already been decided, or has expired
HASH_MISMATCH The decision was for a different version of the request than the one held
NOT_ELIGIBLE This person may not decide this approval, by role, distinctness or evidence level
INVALID_STATE The execution is not in a state that allows this call
INVALID_OUTPUT The output given to settle-step does not match the intent’s schema

A code raised at execution time, such as POLICY_DENIED when a step’s facts have changed, is also reported in the execution’s result and not as an HTTP status.

{
  "execution_id": "exe_01JD3K7Q2M8V5T9W4X6Y0Z1A2B",
  "status": "rejected",
  "replayed": false,
  "steps": [
    { "id": "main", "intent": "procurement.create_purchase_order", "status": "skipped" }
  ],
  "error": {
    "code": "POLICY_DENIED",
    "stage": "policy",
    "step": "main",
    "message": "Order total exceeds remaining department budget.",
    "violations": [
      {
        "rule": "procurement.budget_exceeded",
        "message": "Order total exceeds remaining department budget.",
        "path": "/quantity",
        "actual": 1200000000,
        "limit": 5000000,
        "hint": "Reduce the quantity or request a budget increase."
      }
    ],
    "retryable": false
  }
}

Other members, when they apply: approval (approval_id, expires_at, required), poll_after_s, output on each succeeded step, and retry_after_s inside error for RATE_LIMITED.