CORE GUIDE

PATTERNINTERMEDIATE7 min read

Checkpoint and resume

Long-running agents become recoverable when they persist explicit checkpoints that separate completed durable work from transient model state and define how execution can resume safely.

Mental model

A checkpoint is a durable statement of workflow state: what has been completed, what evidence was produced, what side effects already occurred, and which transition is safe to execute next.

Why it matters

Without checkpoints, a timeout or process restart forces a long-running agent to reconstruct state from logs or rerun earlier steps. That is dangerous when prior steps had external side effects. Reliable recovery requires a durable boundary that can distinguish 'work definitely happened' from 'we merely intended to do it'.

01

Persist state at recovery boundaries

Choose checkpoint boundaries around expensive work, external side effects and human approvals. Store the workflow version, completed step IDs, relevant inputs, outputs, external operation IDs and verification evidence. On resume, validate that the checkpoint still matches current dependencies and policy, then continue from the next safe transition instead of replaying the whole history blindly.

02

Example: research job interrupted after publishing a dataset

An agent gathers sources, normalizes records and uploads a dataset before a worker crashes. A durable checkpoint records the upload object ID and checksum. The resumed worker verifies that object instead of uploading a duplicate, then continues with analysis. If the checksum no longer matches, recovery stops and requests reconciliation.

Common failure modes

  • Saving only conversation text while losing side-effect and step state.
  • Resuming from the last log line without verifying whether the external operation committed.
  • Using checkpoints across workflow versions without migration or compatibility checks.

Engineering heuristics

  • Checkpoint before and after consequential side effects.
  • Store external identifiers and verification evidence with workflow state.
  • Validate workflow version and current policy before resuming old state.

Takeaways

  1. 01Recovery needs durable execution state, not just chat history.
  2. 02A checkpoint marks what is safe to trust after interruption.
  3. 03Resume should verify prior effects before advancing.

Reading evidence

UnseenPractice not completed

This records actions you actually took; it does not claim mastery, proficiency, or certification.

Used in

This Concept is reused across these canonical learning paths.

Related concepts from the Knowledge Graph

These relationships come from the canonical graph, not a separate Guide taxonomy.