Record an agent's work, review what changed, and safely undo what you do not want. No account or server needed.
Run one command. It downloads the right binary for macOS or Linux and adds it to your PATH.
You can also download a binary from the Releases page. Update later with undo update.
Run your agent through Undo. Recording starts automatically and the work is grouped into one Run.
cd my-project/ undo run claude
undo run codex, undo run opencode, or wrap any command with undo run exec. Inspect the Run, ask Undo to remove unwanted work, then apply the exact plan you reviewed.
undo runs undo run show r_421 undo ask r_421 "remove the auth migration work" undo apply rec_812
undo ask changes nothing. Recoveries expire after 24 hours, and apply refuses the whole plan if an affected path changed after the preview.
Runs are optional. Undo can also recover changes made by you, scripts, or tools.
undo timeline --since 10m undo preview src/server.rs 10m undo restore src/server.rs 10m undo restore-deleted src/old-api.rs undo panic
Use preview before a time-based restore. panic is a read-only dashboard for recent bursts, deletions, and recovery options.
By default, Undo keeps 7 days of history and uses up to 1 GB. Change the defaults globally or per project.
# ~/.undo/config.toml (global) or .undorc (per project) retention_days = 7 max_size_mb = 1024
Cleanup runs when Undo starts and every hour after that. Use undo prune to run it now, or add --dry-run to preview.
Undo skips dependencies, build output, Git data, and common secret files by default. Add custom rules in .undoignore:
# .undoignore uses the same syntax as .gitignore *.log tmp/ *.sqlite # negations override the builtin defaults !dist/ # track dist/ if it's actually source in your project
Files larger than 100 MB are listed in history but not saved. Undo also respects the root .gitignore.
run A recorded work window for one agent, tool, or task.
recovery A saved, expiring plan of file writes and deletions. Previewing changes nothing.
checkpoint A named point in history you can preview or restore later.
history Local file history that works even when a change was not made inside a Run.