Use recovery workflows before high-risk changes.
Before migration
Capture a boundary before a data model or memory schema change.
Before agent autonomy
Checkpoint state before a long-running automated workflow.
After incident
Inspect what changed and recover from bad durable memory.
Think in checkpoint, diff, preview, restore.
1. snapshot
Create a checkpoint before the risky change. Creating is metered; listing is free. Neither returns the checkpoint contents.
2. diff
Compare the checkpoint against current state, or against another checkpoint. Free, and values are redacted unless you explicitly ask for them.
3. rollback preview
Free and non-destructive. Reports what would be created, updated, and removed, and returns a short-lived confirmation token.
4. rollback execute
Destructive. Requires that token and a reason. Permanently discards everything created or changed since the checkpoint.
Execute is guarded so an agent cannot silently destroy state.
The confirmation token is single use and is bound to the project, the snapshot, the reason, and the state root observed at preview time. If a commit lands between preview and execute, the restore is refused with state_changed_since_preview instead of discarding the newer write. An expired token returns rollback_confirmation_expired, and you take a fresh preview. Show a human the preview before executing.
Do not use rollback to hide history.
Rollback is for recovery. The audit trail keeps the reason and the affected-key counts for every restore, so teams can understand why state changed and what was restored. Restored and deleted values are never returned by the API. Forget is likewise audited, and is not regulatory erasure: privacy erasure is a separate admin lifecycle.
