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
- A run's status MUST be published by two reads: the full pipeline document and a lightweight status document.
- Both MUST answer the standard
{success: true, data}envelope. - Both MUST publish the persisted lifecycle value verbatim as
data.status. - For a run that does not exist, both MUST answer
404with the codeNOT_FOUNDto a caller holding blanket authority over runs, and403with the codeACCESS_DENIEDto every other identified caller (a request without accepted credentials gets401, conventions). - For a run that exists but that the caller is not allowed to view, both MUST answer
403with the codeACCESS_DENIED. - The two
403answers MUST be indistinguishable, so that the reads cannot be used to learn which runs exist. - The full document MUST carry
node_statuses,jobs,job_status_summaryandexecution_dataalongsideid,name,description,createdAt,lastExecuted,executionCountandtimestamp. - The lightweight document MUST carry
id,status,createdAt,lastExecuted,pendingInterruptandpausedReason. - The lightweight document MUST NOT carry the jobs payload.
- Both MUST carry
terminalReason. - 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.
- Where one does,
terminalReasonMUST be an object carrying that code ascodeand the rule's details asdetails, an object. - The run's completion announcement MUST carry the same
terminalReasonas the two documents. - 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.
GET /api/flowdrop/pipeline/{pipeline_id}
{"success": false, "error": "Pipeline not found.", "error_code": "NOT_FOUND"}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.
{
"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" }
}
}
}