/pattern/checkpointing/

04 · ProductionRuntime ArchitectureState CheckpointingResume from StatePersistent Run State

Checkpointing.
Save state. Resume cleanly.

The execution state is persisted at well-defined boundaries (per node or super-step) so an interrupted or failed run resumes from the last checkpoint instead of restarting — the durable-execution substrate that also enables human-in-the-loop pauses.

In practiceA multi-hour data-migration agent checkpoints after each table, so a network blip resumes from the last table instead of restarting.

When to reach for it

  • Agent runs are lengthy or expensive.
  • External systems might temporarily fail.
  • Manual review between steps is required.

When it backfires

  • Steps are atomic and cheaply repeatable.
  • The state unnecessarily persists sensitive data.
  • Resuming makes no business sense.

The tradeoff

Higher fault tolerance is gained against storage, privacy, and consistency overhead.

The effect

What it actually does.

State is saved so a crashed run resumes mid-flight.

step 1step 2checkpointstep 3resume
Pitfalls

Two ways this pattern will hurt you.

Checkpoints hold secrets

The checkpoint serializes the full state including API keys and user PII. A resumed run leaks sensitive data to logs.

Fix · Redact secrets before serialization. Store sensitive fields in a vault and reference them by handle in the checkpoint.

Resumption with stale tool state

The agent resumes from a checkpoint but the external world has changed. The tool state in the checkpoint is now invalid.

Fix · Invalidate tool-related state on resume. Re-run discovery or validation before continuing tool-dependent branches.

Framework support

Where Checkpointing is native.

LangGraphfirst-class CheckpointersNative
Microsoft Agent Frameworkdurable run stateNative
AWS StrandsAWS Strands WorkflowNative
Google ADKresumable sessionsNative

Search

Search patterns, frameworks, and pages.