EAS-09 Durable State
A Run's progress survives anything that can happen to the machines running it: state is checkpointed at every Step boundary, waiting costs nothing, resume never repeats a side effect, Decisions once made are read rather than recomputed, and every Run follows one consistent Workflow version from start to finish.
| ID | Control | Level | Fix |
|---|---|---|---|
| EAS-09.01 | No effects before a pause point within the same Step | L1 | local |
| EAS-09.02 | Durable waiting | L2 | structural |
| EAS-09.03 | Checkpoint at every Step boundary | L2 | local |
| EAS-09.04 | Synchronous durability for effectful Workflows | L2 | local |
| EAS-09.05 | Decisions recorded, not recomputed | L2 | local |
| EAS-09.06 | Sandboxed replay and forking | L2 | structural |
| EAS-09.07 | Drain on deploy | L2 | local |
| EAS-09.08 | Version pinning | L2 | structural |
| EAS-09.09 | Compatible-change enforcement and tested migrations | L3 | structural |
| EAS-09.10 | Checkpoint storage engineering | L3 | structural |
| EAS-09.11 | Fault-injection testing | L3 | local |
EAS-09.01 No effects before a pause point within the same Step L1
Applies to: All Workflows with pause points (human approval, interrupts, external events).
Code that performs a side effect MUST NOT execute within the same Step before a pause point. Side effects MUST be placed in their own Step (or recorded task) whose completion is persisted in the Checkpoint before the pause, so that resuming never repeats them. The Workflow owner MUST be able to state exactly what re-executes when a paused Run resumes in the framework in use.
Why: Many frameworks re-run an interrupted Step from its beginning on resume, not from the line where it paused; in LangGraph, for example, code before interrupt() in a node runs a second time, so an email sent there goes twice.
Essay →
- Static
- For every function or node containing a pause primitive, no effectful Tool call, ActionIntent execution or external write occurs on the path before the pause. The stack profile states the framework’s resume semantics.
- Runtime
- Within a Run, no
execute_toolspan witheas.tool.effect_classother thannoneis repeated with the sameeas.tool.args_fingerprintbefore and after aneas.waitspan. - Attested
- What exactly re-executes when a paused Run resumes, and what is guaranteed to have been persisted before a side effect happens?
Remediation local: Split each Step that both acts and pauses into two: an effect Step whose completion is checkpointed, then a pause Step; or route the effect through the action ledger with a semantic idempotency key.
Hooks: state.checkpoint, state.resume
· Components: orchestrator
· See also: EAS-03.03, EAS-03.07
EAS-09.02 Durable waiting L2
Applies to: All Workflows that wait for a person, a timer or an external event.
When a Run must wait, it MUST write its Checkpoint, enter status waiting and release its worker. Waiting MUST NOT hold a process, thread, coroutine, open connection or in-memory future.
Why: Three days of waiting should cost a row in a database. A design that holds a process open to wait for a human loses every waiting Run at the first deploy, restart or node failure. Essay →
- Declared
state.checkpointernames a durable store.- Static
- Approval and timer waits are implemented as checkpoint-and-exit with resume triggered by an event or scheduler, not as awaiting a future, polling loop or sleep inside a live worker.
- Runtime
- Waits appear as
eas.waitspans; Runs whoseeas.waitspans span a deploy or worker restart resume and reach a terminal status. - Attested
- If every worker were restarted now, what would happen to Runs currently waiting for approval?
Remediation structural: Replace in-process waits with a durable pause: checkpoint, mark the Run waiting, and resume via a scheduler or event handler that loads the Checkpoint.
Hooks: state.checkpoint, state.resume
· Components: orchestrator, state-store, scheduler
· See also: EAS-03.07, EAS-05.03
EAS-09.03 Checkpoint at every Step boundary L2
Applies to: All Workflows with more than one Step.
The state of every Run MUST be written to a durable store at every Step boundary, and each Checkpoint MUST capture everything needed to resume from it. Resume MUST start from the last committed Checkpoint for that Run. When Steps run in parallel and one fails, results of the Steps that succeeded SHOULD be retained so that a retry reruns only the failure.
Why: Durability means nothing completed is lost when a worker dies; resumability requires that the Checkpoint holds everything needed to continue. Essay →
- Declared
state.checkpointernames a durable store (not in-memory).- Static
- A durable checkpointer is configured for every Workflow in production code paths; in-memory checkpointers appear only in tests.
- Runtime
- Every completed
eas.stepspan is followed by a committed Checkpoint before the nexteas.stepbegins.
Remediation local: Configure the framework’s durable checkpointer against a production database and remove in-memory checkpointers from deployed configuration.
Hooks: state.checkpoint
· Components: orchestrator, state-store
EAS-09.04 Synchronous durability for effectful Workflows L2
Applies to: Workflows with any Tool whose effect_class is not none.
Where the framework offers a choice of durability mode, Workflows that take actions MUST checkpoint synchronously, so that a Step’s Checkpoint is committed before the next Step begins. Asynchronous or end-of-Run checkpointing MUST NOT be used for such Workflows.
Why: An asynchronous Checkpoint lost in a crash means the last Step runs again, and if that Step had an effect, the effect happens twice. Essay →
- Declared
state.durabilityis set tosyncfor the Workflow.- Static
- The framework’s durability or checkpoint mode is set explicitly to synchronous for effectful Workflows; a framework default counts only if the profile confirms it is synchronous.
- Runtime
- For effectful Workflows, no
eas.stepspan starts before the previous Step’s Checkpoint commit has completed.
Remediation local: Set the durability mode explicitly in Workflow configuration and declare it in the manifest.
Hooks: state.checkpoint
· Components: orchestrator, state-store
· See also: EAS-03.04
EAS-09.05 Decisions recorded, not recomputed L2
Applies to: All Workflows.
Every ModelCall MUST execute in a construct whose result is recorded durably (an activity, task or checkpointed Step) and returned from the record on replay or resume. Recovery MUST read recorded Decisions and MUST NOT re-invoke the model for a Decision already made. Other nondeterministic inputs (external calls, random values, current time) MUST likewise be recorded.
Why: Decisions, once made, are facts: the model is asked once, its answer is recorded, and recovery reads the record. Calling a model directly from replayed workflow code would produce different decisions from the original Run. Essay →
- Static
- In replay-based engines, ModelCalls and other nondeterministic operations occur only inside activities, never in workflow code; in checkpoint-based frameworks, each Decision is part of the checkpointed state before any action based on it.
- Runtime
- In resumed Runs, no Step that completed before the resume has a ModelCall span after it (excluding explicit forks under EAS-09.06).
Remediation local: Move ModelCalls into recorded activities or tasks, and persist each Decision in the Checkpoint before acting on it.
Hooks: model.after, state.checkpoint
· Components: orchestrator, state-store
EAS-09.06 Sandboxed replay and forking L2
Applies to: Platforms that offer replay, forking or “time travel” from an earlier Checkpoint.
In replay or fork mode, every Tool with effect_class other than none MUST be replaced by a recorded or sandboxed version, and no ActionIntent created in such a Run MUST reach the Executor against real systems. Replay mode MUST be enforced by the platform, not left to the operator.
Why: Forking from a past Checkpoint is extremely valuable for debugging and evaluation and dangerous if the branch can reach real systems; debugging an incident must never cause a second one. Essay →
- Static
- The replay or fork entry point sets a mode that the tool interception point or Executor reads, substituting recorded results or sandbox backends for effectful Tools; real credentials are not issued to forked Runs.
- Runtime
- No
eas.executespan is linked to a Run in replay or fork mode. - Attested
- When an engineer forks a production Run to debug it, what prevents the fork from sending a real message or making a real payment?
Remediation structural: Make replay mode a property of the Run checked in tool.before and in the Executor, and route effectful Tools to recorded responses or sandbox backends in that mode.
Hooks: state.resume, tool.before
· Components: orchestrator, tool-gateway, executor
· See also: EAS-03.10
EAS-09.07 Drain on deploy L2
Applies to: All Workflows in production.
On deploy, old workers MUST stop taking new work, finish the Step they are executing within a time limit, write its Checkpoint and exit. Runs MUST NOT be killed mid-Step by a deploy. New workers resume runnable work from Checkpoints.
Why: With durable state, deploys become manageable: paused Runs are on no worker and are unaffected, and in-flight Runs reach a Step boundary before their worker exits. Essay →
- Static
- Workers pull runnable work from a queue; shutdown handling stops pulling, waits for the current Step up to a configured timeout, checkpoints and exits; the deployment’s termination grace period exceeds that timeout.
- Runtime
- No
eas.stepspan is left unterminated or ends in error across a deploy; Runs active at deploy time reach a terminal status. - Attested
- What is the drain timeout, and what happens to a Step still running when it expires?
Remediation local: Handle the termination signal by stopping intake and finishing the current Step, and set the platform’s grace period above the longest expected Step.
Hooks: state.checkpoint
· Components: scheduler, orchestrator, release-control
· See also: EAS-05.14
EAS-09.08 Version pinning L2
Applies to: All Workflows whose Runs can outlive a deploy (waiting or long-running Runs).
Each Run MUST record the Workflow version it started on, and every Checkpoint MUST be tagged with that version. The default strategy MUST be pin and drain: a Run resumes only on the version that started it, old versions remain deployed with workers able to run them until their last Run finishes or is cancelled, and new Runs start on the new version. Resuming on a different version is permitted only under EAS-09.09.
Why: Resuming on new code can break topology, state schema or, most insidiously, semantics, where nothing fails but the Run follows two designs. Pin and drain is the only approach that guarantees one consistent design from start to finish. Essay →
- Declared
workflows[].versionis set, andstate.version_strategyincludespin_and_drain(or namescompatible_only/migratewith EAS-09.09 evidence).- Static
- The Run record and each Checkpoint store the Workflow version; resume routes to workers for that version; deployment keeps old versions running while Runs pinned to them exist.
- Runtime
- All spans of a Run carry the same
eas.workflow.version, unless a migration under EAS-09.09 is recorded. - Attested
- When a Run on the previous version resumes after a deploy, which code runs it?
Remediation structural: Record the version at run.start, check it at state.resume, and use the engine’s version-routing support (or versioned worker pools) so old versions keep running until drained.
Hooks: run.start, state.resume
· Components: orchestrator, scheduler, release-control, state-store
EAS-09.09 Compatible-change enforcement and tested migrations L3
Applies to: Workflows that apply changes to in-flight Runs (strategy compatible_only or migrate).
The platform MUST keep an inventory of where every paused Run is waiting, and CI MUST compare each change against it and block deploys that rename or remove any Step, state field or type a paused Run might touch. Changes applied in place MUST be additive. Breaking changes applied to in-flight Runs MUST use explicit migrations that transform the old version’s state into the new one on resume, tested against real Checkpoints sampled from production with personal data removed.
Why: Additive changes are safe in place; renames and removals strand paused Runs. Migrations deserve the same discipline as event-schema migrations in a streaming system. Essay →
- Declared
state.version_strategylistscompatible_onlyand/ormigrate.- Static
- A paused-Run inventory (Step and version per waiting Run) exists; a CI check diffs Workflow topology and state schema against it; migration code is versioned with tests that load sampled, redacted Checkpoints.
- Runtime
- Resumes that change
eas.workflow.versioncorrespond to a recorded migration. - Attested
- Show the last deploy blocked by the paused-Run check, or the last migration and the Checkpoints it was tested against.
Remediation structural: Build the paused-Run inventory from the state store, add a CI gate against it, and run migrations in state.resume with tests over a redacted Checkpoint sample.
Hooks: state.resume
· Components: release-control, state-store, data-governance
· See also: EAS-09.08, EAS-12.11
EAS-09.10 Checkpoint storage engineering L3
Applies to: Platforms running Workflows at volume.
Checkpoint storage MUST be capacity-planned as a workload. Large objects (documents, large tool results) MUST be stored in object storage and referenced from Checkpoints, not copied into them. The store MUST be sharded by Run. Checkpoints MUST have a retention policy: full while the Run is active and for a debugging window afterwards, then compacted to the final state, then deleted. Checkpoints MUST be included in the personal-data inventory and the deletion path.
Why: A Checkpoint can be tens or hundreds of kilobytes per Step, written at every Step of every Run; and it contains everything the agent saw, so it is a copy of personal data. Essay →
- Declared
state.checkpointernames the store; retention periods are documented.- Static
- Checkpoint serialisation replaces large payloads with object-storage references; the store is partitioned by Run; retention and compaction jobs exist; deletion fan-out includes the checkpoint store.
- Attested
- What is the checkpoint write volume and growth rate, and how long is a completed Run’s full state kept?
Remediation structural: Externalise large objects at the state.checkpoint hook, partition the store by Run, and schedule compaction and deletion according to the retention policy.
Hooks: state.checkpoint
· Components: state-store, data-governance
· See also: EAS-12.07, EAS-12.09
EAS-09.11 Fault-injection testing L3
Applies to: All Workflows with effectful Tools or pause points.
CI MUST kill workers at every Step boundary and at points inside Steps, resume the affected Runs, and assert that no side effect happened more than once and that the final state equals that of an uninterrupted Run. Before each deploy, a sample of real paused Checkpoints MUST be resumed on the candidate version, and the deploy MUST fail if any cannot continue.
Why: Confidence that durability, resumption and versioning work comes only from deliberately breaking them. Essay →
- Static
- A fault-injection test suite that terminates execution at and inside Step boundaries, with assertions on effect counts (for example via idempotency keys or a sandbox recorder) and final-state equality; a pre-deploy job that resumes sampled paused Checkpoints on the candidate version.
- Attested
- Show the most recent CI run of the fault-injection suite and the pre-deploy resume check.
Remediation local: Add a test harness that interrupts Runs at configurable points against sandboxed Tools, and a release gate that resumes a redacted sample of paused Checkpoints on the candidate.
Components: release-control, eval-platform · See also: EAS-09.01, EAS-09.09