Skip to Content

Checkpoints

Two tools, checkpoint and restore_checkpoint, let the agent save the project’s file tree under a label and put the files back to a saved version; restoring does not change the running app.

A checkpoint holds the code in app/ only. Database data is not part of it.

checkpoint

Saves all current files as a labelled checkpoint. Checkpoints show in the dashboard’s Deploys & history tab.

  • Parameters: project; label: 1–120 characters, for example “API phase done”.
  • Returns: id, label, createdAt.
  • When the agent calls it: after each phase that works, and before a large change.

Named checkpoints are never deleted to make room. A project holds up to 100; saving more is refused with CHECKPOINT_LIMIT. Automatic copies (before each write that changes files, before block_add) rotate on their own, and the 10 newest are kept.

restore_checkpoint

Replaces all files with a checkpoint or an automatic copy. Before replacing them, manh.run saves the current tree as an automatic copy, so you can go back.

  • Parameters: project; checkpoint_id: from get_project (the checkpoints list) or from a write_files result.
  • Returns: restored (number of files), deployed: false.
  • When the agent calls it: when a change broke the app and the earlier version is needed.

The running app does not change until deploy runs. A file tree that deployed successfully before skips check on deploy, so new rules never block a rollback.

restore_checkpoint({ project, checkpoint_id }) → files back to the old version deploy({ project }) → live app back to the old version

Next steps

Last updated