Glossary

Checkpoints and undo for AI coding agents

A checkpoint is a saved state of your code before an agent acts, so you can go back to it. How much an undo restores depends on what the checkpoint recorded.

By Macaron · Updated October 16, 2026 · Other tools described as of October 1, 2026

Short answer. Undo for agents comes in two kinds. Tool-level checkpoints record the edits an agent made with its own file tools; git-level checkpoints record the whole working tree. Neither can undo what happened outside your repository, like a deploy or a database migration.

Why agents need undo

An agent makes several changes per turn, and a bad turn is easier to throw away than to repair by hand. Without checkpoints, the choice is between picking through a large diff and discarding the whole session.

Two kinds of checkpoint

Records
Tool-levelFiles the agent edited with its own edit tools
Git-levelThe repository's working tree
Covers shell changes
Tool-levelNo
Git-levelYes, inside the repository
Example
Tool-levelClaude Code's /rewind
Git-levelMacaron's per-turn undo

Claude Code's /rewind

As described in Claude Code's docs, read on October 1, 2026.

Claude Code captures the state of your code before each prompt. /rewind, or Esc twice, lets you restore the code, the conversation, or both. Its docs list the limits: files changed by shell commands such as rm, mv or cp aren't tracked, most subagent edits aren't restored, changes made outside Claude Code aren't captured, and checkpoints aren't a replacement for version control.

In Macaron

Macaron takes Git snapshots before and after a supported turn. Review shows that turn's diff, including repository changes made through shell commands. Undo reverses the turn's changes rather than restoring the whole project to an old snapshot. If later changes conflict, undo refuses; undo those later turns first. A Git project is required, and actions outside the repository are not reversed.

What no undo can reach

  • A deploy the agent ran.
  • A migration against a real database.
  • Messages, payments or API calls it made.
  • Files outside the repository.

That's why it matters which credentials a run has. In Macaron, connectors such as Vercel, Supabase or Stripe reach a run's commands only when you switch them on.

Questions

Is undo the same as git revert?+

It reverses the changes between the turn's before and after snapshots. You do not need to have committed the turn, but the project must use Git. If later edits conflict, undo refuses instead of overwriting them.

Can I undo a turn from an hour ago and keep later ones?+

In Macaron, yes if those later changes do not conflict with the turn you are undoing. If they changed the same files in a conflicting way, undo the later turns first or ask the agent to reverse the specific change.

Do checkpoints replace commits?+

No. They're for the session. Commit what you keep.

Sources and dates

Facts about other products come only from these pages, on the dates shown; prices are as published that day. Macaron's details reflect the app and documentation reviewed for this guide on October 16, 2026. Products change, so check their sites for the latest.

Keep reading