When to reach for it
- Agent runs are lengthy or expensive.
- External systems might temporarily fail.
- Manual review between steps is required.
/pattern/checkpointing/
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
When it backfires
The tradeoff
Higher fault tolerance is gained against storage, privacy, and consistency overhead.
State is saved so a crashed run resumes mid-flight.
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.
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.
Next pattern
Search patterns, frameworks, and pages.