- Source
- arXiv
- Published
- Runtime
- 0:00
- Snippets
- 5
A conversation between
Resume Means Resume: A Machine-Checked Conformance Contract for Checkpoint, Interrupt, and Resume Semantics in Workflow Persistence Layers
§02
Snippets
-
Five widely deployed agent workflow frameworks answer differently what resume means for already-fired effects, none exposes a machine-checkable contract, and behavior violates even stated fragments.
Workflows silently lose or duplicate work across production restarts because no framework documents or guarantees what resume actually does.
-
The RESUME CONTRACT states six properties (prefix continuation, effect exactly-once, fork determinism, checkpoint validity, consume-once, recovery determinism) and fork-intent and liveness obligations with TLA+ model checking exhaustively across 7.4 million states.
A formal machine-checkable specification lets you prove workflows actually deliver effects reliably, not just claim to.
-
LangGraph 1.2.9 re-executes work after SIGKILL (at-least-once on crashes), CrewAI 1.15.2 re-executes completed effect-bearing methods against its written claim, pydantic-graph cannot resume after mid-node crash—no two frameworks share a conformance profile.
Users cannot rely on any single framework's crash semantics; each one has silently different behavior that contradicts its own documentation.
-
Consume-once fails under concurrent delivery: k processes resuming one parked interrupt fire the gated effect k times, saturation 1.0 in 36 of 40 cells, and the failure crosses hosts.
Distributed recovery (the most common failure mode in production) breaks exactly-once guarantees across all tested frameworks.
-
REMIT is a reference sequencer whose Verus-verified recovery core is line-identical to the shipped executable, repairing fork and validity cells via an opt-in gate claiming consumption in the shared store.
Formal verification can scale from theory to production without rewriting; one correct implementation can replace fragmented framework behavior.
§03
Synthesis
Resume Means Resume
Workflow systems that survive crashes must decide what happens when they restart: do effects (like API calls) run again, and what does "resuming" actually mean? Five popular agent frameworks answer this question differently, document their answers poorly, and don't match even what little they claim. This paper formally specifies what resume should mean and measures how badly real systems fail against that spec.
The Conformance Contract
The authors define the RESUME CONTRACT—eight properties a persistence layer should satisfy:
- Prefix continuation: resuming picks up where execution stopped.
- Effect exactly-once: each side effect fires exactly once, whether interrupted or crashed.
- Fork determinism: if execution branches (e.g., parallel tasks), the branch structure is deterministic.
- Checkpoint validity: saved state is internally consistent.
- Consume-once: a queued task runs at most once.
- Recovery determinism: restarting from a checkpoint produces the same behavior.
- Fork-intent and liveness obligations (guarantees about intent to fork and progress).
They formalized these in TLA+, a mathematical language for checking distributed systems properties, and verified a reference implementation exhaustively across 7.4 million state combinations. A fault matrix tested which properties hold under different failure modes (interrupts vs. crashes, single vs. multi-process).
What Real Systems Actually Do
The paper's empirical core is damning. Testing five frameworks at pinned releases with a deterministic harness (no LLM involved) reveals:
- LangGraph 1.2.9: saves a second resume value but never reads it; silently persists invalid schema; after a real SIGKILL, re-executes completed work. It's exactly-once for interrupts, at-least-once for crashes—inconsistent semantics.
- CrewAI 1.15.2: re-runs completed effect-bearing methods even after recording them done, violating exactly-once.
- pydantic-graph 1.x: cannot resume after a crash mid-node.
- No two frameworks share a conformance profile.
The consume-once failure is especially concrete: when multiple processes try to resume the same interrupt, all k processes fire the gated effect k times (saturation 1.0 in 36 of 40 test cases). This breaks across hosts.
The Fix: REMIT
The authors offer REMIT, a reference sequencer with a Verus-verified recovery core (cryptographic proof of correctness). Its executable code is line-identical to the verified spec. Two repairs: (1) fork and validity cells are fixed in the reference model, and (2) the consume-once cross-process failure is repaired at the read path—an opt-in gate in the shared store that serves one racer and rejects the rest before any node executes.
This matters because workflow systems (LangGraph, CrewAI, pydantic-graph) power production AI agents. Silent failures, duplicate side effects, and inconsistent semantics on crash are not theoretical: they corrupt data, re-bill customers, and send duplicate notifications. The paper proves five deployed systems fail conformance and offers a machine-checked contract and repair path.
Mine your own.
Lode is a workbench, not a feed. Paste a YouTube URL. The model proposes a transcript, a set of quote-grounded snippets, a synthesis essay, and the fan-out. You decide what stays.