Skip to main content
The checkpoint command manages file-level checkpoints using shadow git — save, list, diff, restore, and rewind workspace snapshots.
All checkpoint subcommands respect checkpoints.storage_dir from your project config (agents.yaml). This means praisonai checkpoint list, restore, and diff operate on the same store as praisonai code --checkpoints sessions and praisonai run auto-checkpoints.

Quick Start

Usage

Save Checkpoint

Expected Output:

List Checkpoints

Expected Output:

Show Diff

Both the from and to arguments accept a full id, short id, unique prefix, or the alias last / latest.

Restore Checkpoint

A checkpoint id and --step are mutually exclusive — providing both returns Provide either a checkpoint id/'last' or --step N, not both.

Rewind Checkpoints

Rewind the workspace back N checkpoints from the latest. rewind is the shortest command for undoing the most recent checkpointed change — you don’t need to remember an id.
Expected Output:
When to use rewind vs restore:
  • restore <id> — you know the exact checkpoint id and want to jump there.
  • rewind [steps] — you just want to undo the last N checkpoints without looking up ids (equivalent to restore on list_checkpoints()[steps]).
steps must be >= 1. Passing 0 or a negative value is rejected by the CLI before the service runs.
rewind can reach shadow-git commits older than max_checkpoints. The max_checkpoints limit only trims the in-memory listing — the underlying shadow git retains every commit, so rewind N still works even if N > max_checkpoints.
Errors:
  • Cannot rewind 5 step(s): only 2 checkpoint(s) available — history too short.
  • steps must be >= 1 — invalid input.

Delete Checkpoints

Omitting --yes prompts: Delete all checkpoints? [y/N].

Reference Aliases

Every subcommand that accepts a checkpoint reference (restore, diff, run --restore) supports these forms: Ambiguous prefix example:
Ambiguous prefixes are rejected so a workspace-mutating restore never targets the wrong checkpoint.

Python API


See Also