// Checkpoints

Undo. Redo. Every edit.

Checkpoints capture the workspace before each fs_write or fs_edit_hashline overwrite so an operator can /undo a regretted change, /redo to replay it, and explore agent edits without fear of losing work.

/undo/redozpaq backedPer session
01

Snapshot before every overwrite

Whenever the agent is about to mutate a file through fs_write or fs_edit_hashline, PasClaw captures the prior contents first. Multi-edit turns dedupe so a single file is only snapshotted once per turn.

02

Rewind with /undo

From the TUI or interactive agent, /undo restores the most recent snapshot in place. The same command works inside pasclaw agent and the sample dprojs, not just the TUI.

03

Replay with /redo

The checkpoint backend uses zpaq for content-addressable, dedupe-by-default storage. That history makes /redo possible on top of /undo so an operator can step forward through changes they previously reverted.

04

Scoped to one session

Each session keeps its own archive under workspace/checkpoints/<session>/archive.zpaq, so multi-edit sessions stay compact and undo history never leaks across unrelated work.

From the documentation

Technical details

Implementation notes drawn from the PasClaw repository documentation.

When a snapshot is taken

Checkpoints run immediately before fs_write or fs_edit_hashline overwrites a file, so the recorded state is the pre-edit content rather than a later mutation.

  • Opt in with checkpoints.enabled: true in config.json (on by default in the stock profile).
  • Multiple edits to the same file within one turn dedupe to a single snapshot.
  • Snapshots live under workspace/checkpoints/<session>/ alongside the session JSON.

zpaq backend enables /redo

The backend was switched to zpaq for content-addressable, dedupe-by-default storage. That makes /redo viable on top of /undo because forward history survives a previous revert.

  • Archive path: workspace/checkpoints/<session>/archive.zpaq.
  • /undo reverts the most recent checkpoint; /redo replays the next one forward.
  • Both commands work from pasclaw agent (interactive) and the TUI.

Common questions

Frequently asked questions

Keep exploring

See how the rest of PasClaw fits together.

Security sandbox