Undo everything an AI coding agent did, including shell commands
Many coding agents can only revert the edits they made through their own edit tools. Darce goes further: before every change it snapshots your working tree, so /undo also reverses whatever a shell command did, files it created, modified or deleted.
The two commands
/undo(or/u) steps back one change./rewind(or press Esc twice) opens a rewind tape: scrub through every change Darce made this session with a live diff of each step. Press Enter and your files and the conversation go back to before that step.
/diff shows every file Darce changed this session.
What counts as a change
Every step that can change your project is a checkpoint:
- edits and new files written by Darce
- files a shell command created, changed or deleted (for example a code generator, a formatter, or an
rm) - a whole swarm merge, which
/undoreverts as one step
The end-of-task receipt counts files changed by shell commands as well as direct edits, so you can see what happened before deciding whether to undo it.
How it works
In a git repository, Darce stores its snapshots under private refs. It never touches your branch, your index (staged changes) or your stash, so undoing does not interfere with your own git workflow.
What undo can't reverse
Undo restores files on your machine. It cannot reach things outside it: a deploy, a database migration, a message sent to an API, a package published to a registry. Darce treats these differently:
- Deploy, migrate, seed and release scripts, database clients, and scripts that look like they change things outside your machine wait for your approval, and the prompt says that
/undocan't reverse them. - Destructive SQL is flagged as dangerous.
See Safety for how commands are scored and which ones ask first.
Undo history and git
Undo history lasts for the session: Darce removes its refs when you quit. Files listed in .gitignore (like node_modules) aren't snapshotted. Outside a git repository, /undo covers Darce's own edits and new files, but not what shell commands did.
Coming from Claude Code? Here's what Claude Code's /rewind can't undo and how the two compare.
Next: Safety · All docs · Model directory · Claude Code alternative