Checkpointing persists an agent run's full state at each step; replay reconstructs that state deterministically from the log. Together they turn opaque, unrepeatable AI runs into debuggable, resumable, forkable computations.

Every experienced agent engineer has lived the debug nightmare: a run failed in production, the context is gone, and the failure cannot be reproduced because the model is a function of an unreplayable trajectory. Checkpoint-replay eliminates the class of problem. A checkpoint captures the complete run state — messages, tool results, plan position, variable bindings, external side-effect receipts. A replay re-executes from any checkpoint, substituting recorded observations for live calls, so the run can be stepped through like a debugger rather than rerolled like dice.

The enabling discipline is deterministic state reconstruction: never derive state from model output you did not persist. If the agent's scratchpad was summarized away, the summary must be logged; if a tool call returned a 10,000-token payload, the replay needs the relevant slice. Frameworks like LangGraph (checkpoint per super-step), Temporal (durable execution), and restoration-based coding agents all converge on the same rule: the log is the truth, the live process is a cache.

What Good Checkpoints Buy

  • Resume: a crashed 40-step run continues from step 39 instead of restarting — and paying — for 39 steps.
  • Forking: branch from step 12, try a different strategy, compare outcomes — counterfactual debugging for agents.
  • Regression testing: pin a production failure's checkpoint as a test fixture; a model upgrade replays it to check the fix still holds.
  • Honest costing: per-step token metering falls out of the checkpoint log for free.

The storage bill is trivial next to the token bill. Treat uncheckpointed agent runs the way you would treat a database without WAL — technically possible, professionally indefensible.