AIR PATTERN · 30 MIN

State Outside the Model

Keep authoritative workflow state in a durable system of record.

USED IN · 02 · State

Problem

An agent is operating across an unreliable boundary. Its local view may be stale, a previous attempt may have partially succeeded, and an apparently safe retry may create a second effect.

Naive design

failure → retry the same action → hope

Pattern

Keep authoritative workflow state in a durable system of record. Make the precondition visible, keep evidence with the decision, and persist the outcome before allowing the workflow to advance.

inspect current state
        ↓
validate invariant
        ↓
perform one bounded action
        ↓
persist outcome + evidence

Invariant

A run may advance only when the system can explain which state it observed, which decision it made, and which effect it accepted.

Tradeoffs

This adds state, a verification step, and operational work. Use it where duplicated or untraceable effects cost more than the additional coordination.

When not to use

Skip this ceremony for disposable, read-only exploration where partial progress has no external consequence and a clean restart is genuinely safe.

Concepts used

Learn it in context in Course 001 →