Skip to content

A checkpoint round-trip preserves cancellation

Whether a run was cancelled or completed cannot be re-derived after the fact; "finished" looks identical either way. So the outcome is recorded, not inferred.

The rule

Normative: this is the rule
  1. Execution state MUST carry its terminal outcome explicitly: completed, failed or cancelled, and unset while the run is live.
  2. A checkpoint MUST persist that outcome.
  3. A snapshot's status MUST be the persisted outcome, never a re-derivation from whether the run finished, which cannot express cancellation.
  4. A cancel signal MUST mark the state cancelled and MUST write the final checkpoint.
  5. Seeding a new turn from a terminal state MUST clear the run state, outcome and execution position alike (SG-12), so a recorded cancellation never closes a conversation thread.
  6. Only explicit resumption of a run is gated (INT-14).

What it means

"Finished" looks the same whether a run completed, failed or was cancelled, if all that is stored is whether it finished at all. Deriving the outcome from completion alone cannot tell a deliberate cancellation apart from an ordinary finish, so the outcome has to be written down as its own fact, and a checkpoint has to carry that fact forward rather than reconstructing it.

Cancellation recorded this way still does not close a conversation thread: seeding a new turn from a terminal state clears the run's outcome along with its execution position, so the next turn starts clean. Only resuming the run itself is gated (INT-14); continuing the conversation is not.

Example

A checkpoint written with the outcome recordedcancelled
{"isComplete": true, "error": null, "status": "cancelled"}

Why

Recorded under OPEN-25.

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