ncode

CLI docs Rewind and changes

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.

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 a conversation to an earlier turn restores every file its later turns changed.

What a checkpoint does not cover:

  • changes made by shell commands the agent ran (a formatter, a code generator, git checkout, rm): only file-tool writes are snapshotted;
  • anything outside the project folder;
  • the conversation itself: rewind restores files, it does not delete messages.

Rewinding#

text
/rewind

opens this conversation's checkpoints. Pick the turn to go back to: the files its later turns changed are restored to how they were before, and files those turns created are deleted again. The conversation itself stays as it was; only files change.

Checkpoints in the Ctrl+P palette opens them too.

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.

What changed#

Changes in the Ctrl+P palette shows the files this conversation changed.

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 sub-agents#

By default a sub-agent 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. Isolate sub-agents and How to isolate in Settings → Agents & limits control this.