Agents drift. A session that starts perfectly aligned ends three refactors later in a place you never asked for. Checkpoints are how you make drift cheap.
Commit before, not after
The habit that changes everything: commit the working state before a risky change, not just the result after. If the agent spirals, you restore in one command instead of untangling for an hour.
A rhythm that works
- Green state → commit with a boring message.
- Ask for the change.
- Verify → commit again.
Ten tiny commits are not noise; they are restore points. Squash them later if your history cares.
Use branches as sandboxes
For experiments, branch first. When the vibe turns weird, deleting the branch costs nothing. On main, every wrong turn is a negotiation.
With agents that commit themselves
Give the agent a commit-message convention and a rule: one logical change per commit. Agents that checkpoint their own work are dramatically easier to supervise — you can git log the session like a flight recorder.