ncode CLI Features
Rewind and changes
Every file an agent changes with a file tool is saved first, so a turn that went wrong is one command away from undone. Rewind goes one step further: it can also take the conversation back, so you can edit the prompt that went wrong and send it again.
Checkpoints#
Right before an agent changes a file with a file tool, ncode saves the file's previous content. If the file did not exist yet, it records that, so restoring deletes the new file again. Rewinding to an earlier turn restores every file that turn and the turns after it changed.
What a checkpoint does not cover:
- changes made by shell commands the agent ran (a formatter, a code generator,
git checkout,rm), and by your own!commands: only file-tool writes are snapshotted; - anything outside the project folder.
Rewinding#
/rewindor Esc twice quickly, with an empty draft and nothing streaming, opens the list of this conversation's turns, newest first:
Turn 7 · add a --verbose flag to the parser · 3 files · 2h ago Turn 6 · explain the failing test · 0 files · 3h ago
↑ and ↓ move, Enter picks a turn, Esc closes. A turn that only steered a running turn is not offered as a place to go back to. If the list is empty it says Nothing to rewind yet.
Picking a turn asks what to put back:
| Key | Puts back |
|---|---|
Enter or b | the conversation and the files |
c | the conversation only |
f | the files only |
| Esc | nothing; cancel |
The dialog repeats what happens: Later turns are folded (kept, not deleted); files come back from checkpoints.
- The conversation. The prompt you picked and every later message are folded away: they stay in the database, stop being part of what the model reads, and are left out of the transcript. The prompt comes back into the composer, with the cursor at its end, so you can edit it and press Enter to send it as a fresh message. A draft that was there comes back with Ctrl+Z. The notice reads
Rewound to turn 7 · 3 file(s) restored · edit and press Enter to resend. - The files. Every file touched in that turn or a later one goes back to how it was before that turn, and files those turns created are deleted again. The transcript says
Rewound 3 file(s) to before turn 7.A skipped file is named in the transcript, and the notice adds· K skipped (see the transcript). With the files only, the conversation is unchanged and nothing goes into the composer; the notice readsFiles back to before turn 7 · 3 restored. - Running work stops first. Any run of this conversation launched at or after that turn is stopped before anything changes. A rewind is refused while the conversation is being compacted. A turn from before a
/compactcan still be rewound; the folded turns and the full history come back. - If the files fail. When the conversation part succeeded and a file could not be restored, you are told, and the conversation stays rewound.
/undo is the short form: it asks the same question for the newest turn.
Folded turns are the ones the desktop app folds when you edit a message there, so the app shows the same conversation when it opens the database later. The difference: editing in the app restores no files, and a terminal rewind can.
Warning Rewind covers file-tool writes only. If an agent ran a command that changed files (a formatter, a generator, git checkout), undo that with your own tools, for example Git.

This screenshot shows the checkpoints list of the 0.1.0 terminal, which restored files only. In 0.2.0, /rewind lists the turns and offers the three choices above.
What changed#
Changes in the Ctrl+P palette shows the files this conversation changed. Checkpoints in the palette lists the saved file snapshots; with none yet it says No checkpoints yet: they are taken before each edit.
In the transcript, each file-writing tool row shows its diff under it. /diff off draws every tool row on one line instead, and /diff on brings the diffs back; Diff lines shown in Settings → Layout & transcript sets how many lines a row shows (12 by default).
Isolated workers#
By default a worker works in its own isolated copy of the project, so several agents can edit at once without stepping on each other. Its changes reach your project only when its lead integrates them, and your own uncommitted changes are never counted as a worker's: a worker that changed nothing says so (no file changes), and one that did shows +N −M in K files. Isolate sub-agents and How to isolate in Settings → Agents & limits control this.