ncode Desktop The workspace
Rewind
Agents change real files in your project. ncode keeps a snapshot of every file an agent is about to change, so you can put files back the way they were.
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 a turn#
- Open the rewind list: click Rewind on a run's card, choose Rewind… in the conversation's header menu, or type
/rewindand press Return. - The Rewind dialog lists each turn that changed files, with its number, how many files it changed and when. Click a turn to see its files.
- Click Restore beside one file, or Restore files to before this turn, then confirm.
ncode puts the files back and adds a note to the conversation, for example Rewound 3 file(s) to before turn 4. If a file cannot be restored, it stops and says which one and how far it got; fix the cause and rewind again.
Edits you saved yourself in the Changes view appear as a separate Manual edits group, restorable file by file.
Restoring from the Changes view#
The Changes view of the agents pane shows the same snapshots next to their diffs. Use it to look at exactly what changed before you restore anything.
Going back in the conversation#
Rewind restores files and keeps every message. To continue from an earlier point of the conversation instead, hover a message and choose Fork from here: ncode opens a new conversation with the messages before that one, and puts the message itself back in the composer so you can edit and resend it.
Before you rely on it#
- Commit often. Rewind covers file-tool writes inside the project; git covers everything.
- Commands an agent ran are not undone: if an agent ran a migration, installed a package or deleted files with a shell command, rewind cannot bring that back.
- Rewind is per conversation: it lists only the changes made in the conversation you are in.