- R-CLI
- Checkpoints
R-CLI
Checkpoints
Undo, redo, and rewind the file changes R-CLI makes, without relying on git.
Checkpoints let you revert what the agent changed on disk. R-CLI records a checkpoint for every turn, so you can undo a bad edit immediately instead of hunting through a diff.
Checkpoints do not use git. They work in any folder, including one that was never initialized as a repository.
Undo the last turn
/undo
Reverts every file the last turn changed and prints what happened:
Undid "fix the parser" · restored 3 files, deleted 1 file · /redo to reapply
Run /undo again to step further back, one turn at a time.
Redo
/redo
Reapplies the most recently undone turn. Redo history is discarded as soon as the agent makes a new change, so redo always follows your last undo.
Rewind to an earlier checkpoint
/rewind
Also available as /checkpoints. Unlike /undo, rewind always takes two steps so you can see what you are about to change.
Pick a checkpoint
A list of this session’s checkpoints, newest first. Each row shows the time, the prompt that started the turn, and a +added ~modified -removed badge.
Choose what to restore
Restore everything, keep your own hand-edits and restore the rest, or open a file picker and choose individually.
The file picker marks each entry so you know what will happen: + will be restored to its earlier contents, - was created by the agent and will be deleted, ~ edited changed by you since the checkpoint.
What is captured
| Captured | Notes |
|---|---|
| File edits and writes | Exact bytes, so line endings, BOMs, and binary files round-trip unchanged |
| Files created by the agent | Restoring an earlier checkpoint deletes them |
| Shell side-effects | Files a command created, modified, or deleted |
| Sub-agent edits | Folded into the turn that spawned them |
Checkpoints are labeled with your prompt text, truncated to 60 characters.
Only files are rewound — the conversation is not. After a restore, R-CLI tells the model that the files moved, but earlier messages still describe the old state. For a large rewind, start a new thread with /new.
Limits
| Limit | Value | Effect |
|---|---|---|
| Per-file capture | 50 MB | Larger files are recorded as skipped and cannot be reverted |
| Workspace file count | 25,000 files | Shell-side-effect capture turns itself off above this |
| Workspace captured size | 500 MB | Shell-side-effect capture turns itself off above this |
When capture disables itself, R-CLI warns you once. File edits made through the agent’s own tools are still captured; only shell side-effect tracking stops.
Skipped files are always reported by name, on a single line after the restore summary:
Skipped: /Users/you/project/assets/video.mp4 (too large), /Users/you/project/src/config.ts (hand-edited, skipped)
These directories are never scanned when tracking shell side effects:
.git .backboard node_modules .venv venv __pycache__
.cache dist build out target .next .turbo coverage
Hand-edited files
If you changed a file yourself after the agent touched it, R-CLI treats it as diverged. /undo stops its one-keystroke path and shows the options screen so you can decide whether to keep your edit or discard it. Your work is never silently overwritten.
Where checkpoints are stored
<cwd>/.backboard/sessions/<session-id>/checkpoints/journal.jsonl
<cwd>/.backboard/sessions/objects/
<cwd>/.backboard/sessions/pending-undo.json
<cwd> is the directory R-CLI was started in — not the repository root, unlike settings.json and mcp.json. Starting R-CLI from a subdirectory gives you a separate store, so checkpoints from earlier sessions will not be listed. Start from the same directory each time, or pass --cwd.
The journal is append-only. File contents are stored once in a shared, content-addressed object store, so repeated edits to the same file do not duplicate data.
If R-CLI is killed mid-restore, a marker written before any disk change lets the next launch finish the interrupted restore automatically.
Checkpoints protect against crashes, not power loss — writes are flushed but not fsynced. Keep using git for anything you cannot afford to lose.
Gotchas
-
/undo,/redo, and/rewindwill not run while the agent is working. PressEscfirst. -
Checkpoints are per session.
/rewindonly lists checkpoints from the current session. -
Shell capture is rooted at the session’s working directory. Commands that write outside it are not tracked.
-
If checkpoints are unavailable, R-CLI says so rather than silently doing nothing:
File checkpoints are not available in this session.
Related
- Overview — reviewing changes safely
- Permissions — stop unwanted edits before they happen
- Command reference — all checkpoint commands