Skip to content

Run status is read from persisted state, on two routes and one envelope

The live picture of a run is whatever has been persisted for it, not what some in-memory tracker happens to remember. A poll therefore answers the same value to every caller, including one served by a process that has just started.

The rule

Normative: this is the rule
  1. A run's status MUST be published by two reads: the full pipeline document and a lightweight status document.
  2. Both MUST answer the standard {success: true, data} envelope.
  3. Both MUST publish the persisted lifecycle value verbatim as data.status.
  4. For a run that does not exist, both MUST answer 404 with the code NOT_FOUND to a caller holding blanket authority over runs, and 403 with the code ACCESS_DENIED to every other identified caller (a request without accepted credentials gets 401, conventions).
  5. For a run that exists but that the caller is not allowed to view, both MUST answer 403 with the code ACCESS_DENIED.
  6. The two 403 answers MUST be indistinguishable, so that the reads cannot be used to learn which runs exist.
  7. The full document MUST carry node_statuses, jobs, job_status_summary and execution_data alongside id, name, description, createdAt, lastExecuted, executionCount and timestamp.
  8. The lightweight document MUST carry id, status, createdAt, lastExecuted, pendingInterrupt and pausedReason.
  9. The lightweight document MUST NOT carry the jobs payload.
  10. Both MUST carry terminalReason.
  11. It MUST be null unless the run reached a terminal status for a reason a rule names by code, as SG-14 and INT-18 do.
  12. Where one does, terminalReason MUST be an object carrying that code as code and the rule's details as details, an object.
  13. The run's completion announcement MUST carry the same terminalReason as the two documents.
  14. Both MUST read persisted state only, so a status written outside the request path is what the next poll returns.

What it means

Two different reads publish the same live picture of a run because both are windows onto the same persisted record, never an in-memory tracker that could disagree with it from one process to the next, or lag behind a status that was just written. The two reads deliberately diverge in only one respect: the lightweight document does not carry the jobs payload at all, because it exists for a caller polling too fast to justify the weight of the full one. A run the caller may not view is refused with 403, never answered with some of its fields quietly blank. A run that does not exist is 404 only for a caller with authority over every run, from whom its existence is no secret. Everyone else gets the same 403 for a run that does not exist as for one that is not theirs, so the reads cannot be used to find out which run identifiers are in use: the scheme the signal API uses (INT-16).

Example

The same scheme holds on both endpoints.

A run nothing matches, asked by a caller with authority over every run404 — refused
GET /api/flowdrop/pipeline/{pipeline_id}

{"success": false, "error": "Pipeline not found.", "error_code": "NOT_FOUND"}
The same request from any other caller, or a run that is not theirs403 — refused
GET /api/flowdrop/pipeline/{pipeline_id}/status

{"success": false, "error": "Access denied", "error_code": "ACCESS_DENIED"}

The paths are examples of the routes API-9 names pipeline and pipeline_status.

A finished run that ended for a reason a rule names by code says why in terminalReason, on both reads and in the announcement that the run has finished, so a client never has to search the jobs or the interrupts for the cause. The member is there on every run and is null until such a run ends. It carries the code and its details: SG-14's iteration budget fails a run with one, and INT-18's expired or cancelled interrupt cancels a run with another. One member serves every such reason, whatever the terminal status.

A run that went past its iteration budgetfailed
{
  "success": true,
  "data": {
    "id": "6918",
    "status": "failed",
    "createdAt": "2026-11-21T09:00:00Z",
    "lastExecuted": "2026-11-21T09:04:12Z",
    "pendingInterrupt": null,
    "pausedReason": null,
    "terminalReason": {
      "code": "MAX_ITERATIONS_EXCEEDED",
      "details": { "max_iterations": 5, "iteration_count": 6, "node_id": "agent" }
    }
  }
}

Why

Recorded under OPEN-25, OPEN-57, OPEN-61, OPEN-65.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · PIPE-1 · changed in spec 1.1