Checkpoints
An agent changes files, and some changes are wrong. You must be able to revert them. Before each write, a harness saves a checkpoint: what the file had before the write. An undo takes the newest checkpoint and restores the old state. If the write made a new file, the undo removes the file. With checkpoints, a bad step of the agent costs one undo, not an hour of repair.
About this lesson
Words to know
- harness
- The program around a model that makes the model an agent: it runs the tools, keeps the context, requests permission and sets the limits.
- checkpoint
- A saved state of a file before a change, so that the change can be reverted.
Why it matters
Coding agents save a checkpoint before each edit, and one command reverts the edit. The same idea is in the undo of an editor and in a commit of Git.
With a year
How it works, a worked example, the exercise with its tests, three hints and the explained solution are in the app, with a year of Algo150 for $29 or ₾49. The first chapter, Model foundations, is free for everyone: start with Vector dot product.