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.

Updated October 1, 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

Each turn in a Macaron chat ends with a card like "Edited 3 files +42 −7". Behind it is a git checkpoint taken at the start of the turn, so undo restores the repository to that point however the agent changed it: its edit tools, a script, or a code generator. Review opens the turn's diff before you decide.

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?+

Close. A per-turn undo resets the working tree to the checkpoint before the turn; you don't need to have committed anything.

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

Not cleanly with any checkpoint system, if later turns built on it. Undo the most recent turns first, or ask the agent to reverse a 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 own details are as shipped on October 1, 2026. Products change, so check their sites for the latest.

Keep reading