Restore a checkpoint
codex_restoreRestore your working tree to a previous checkpoint when Codex changes break your code. The current state is saved as a new checkpoint first, making the rollback reversible.
Instructions
Roll the working tree back to a checkpoint — use it when Codex made things worse. This overwrites files on disk, so confirm with the user before calling it unless they already asked for the rollback. The pre-restore state is always captured as a new checkpoint first, so the operation is itself undoable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | Task the checkpoint belongs to. | |
| checkpointId | Yes | Checkpoint id from codex_checkpoints, e.g. "cp-1". | |
| removeUntracked | No | Also delete files created after the checkpoint. Default false — they are reported as leftovers instead. |