Use case 3 of 12 · First steps

Review, keep or rewind

Decide what stays. Keep or undo each file the task wrote, or take the whole task back to an earlier instruction.

Teaches: ChangesKeep and UndoRewind

The briefAgent mode

Rename the helper formatMoney to formatCurrency everywhere in src, and update its tests.

Done when

  • pnpm typecheck passes
  • pnpm test passes
  • No file in src still mentions formatMoney

Type each line into the "Done when… a command passes, a file exists" field in the brief box and press Enter.

When to use it

After every task that changed files. A rename across a project is a good one to practise on, because it touches many files and some of them may not be ones you wanted changed.

What you will see

Press Ctrl+E to open “Changes” in the inspector. Under “This task” each file the task wrote has its diff and two icon buttons: the tick keeps it, the undo arrow puts it back. “Keep all” and “Undo all” do every file at once. They unlock once the run stops.

If the whole direction was wrong, not one file, rewind instead: hover your instruction in the record and click “Rewind files and record to before this instruction”. The dialog lists what happens to each file before anything changes.

What to check

  • Files you edited yourself after the agent wrote them are marked “Edited since” in Changes and “changed since” in the rewind dialog. Undo and rewind leave those alone, so your own work is not overwritten.
  • Keep what is right and undo the rest; you do not have to take a task’s work all or nothing.
  • Rewinding also removes everything after that instruction from the record; the instruction itself stays. To change the instruction and run it again, use “Edit and rerun” on it instead. Until you send something new, “Redo” brings a rewind back.

In the docs