33People and agents

Checkpoint and rewind

Snapshot the code before each agent turn, and go back to it when the agent goes off track.

Also called Checkpointing

Cursor, Anthropic, Simon Willison

editsbefore each turnrewindPersonYouAgentAgentToolCodebaseContextCheckpoints
How to read this

The problem

The agent sometimes builds the wrong thing, and starting over often works better than repairing it.

Sometimes the agent builds something that doesn't match what you wanted.
CursorBest practices for coding with agentsJan 9, 2026
Starting over often has a higher success rate than trying to fix Claude’s mistakes.
AnthropicHow Anthropic teams use Claude Code

Therefore

As you work with Claude, checkpointing automatically captures the state of your code before each prompt you send that starts a turn.
AnthropicCheckpointing
Checkpoints save snapshots of your codebase during an Agent session. Agent automatically creates them before making significant changes, capturing the state of all modified files.
CursorOverview
Keeping code in version control lets us record how that code changes over time and investigate and reverse any mistakes.
Simon WillisonUsing Git with coding agents - Agentic Engineering Patterns

In use

Anthropic’s Claude Code team

Teams emphasize starting from a clean git state and committing checkpoints regularly so they can easily revert any incorrect changes if Claude goes off track.
AnthropicHow Anthropic teams use Claude Code

Claude Code

Claude Code automatically tracks Claude’s file edits as you work.
AnthropicCheckpointing

Where it breaks

Only the agent’s own file edits are saved: a file changed by a shell command stays changed, and lasting history belongs in Git.

A file that only Bash commands changed isn’t tracked and stays as it is.
AnthropicCheckpointing
Checkpoints are stored locally and separate from Git. Only use them for undoing Agent changes; use Git for permanent version control.
CursorOverview

Sources

  1. Best practices for coding with agentsLee Robinson, Cursor, Jan 9, 2026
  2. How Anthropic teams use Claude CodeAnthropic
  3. CheckpointingAnthropic
  4. OverviewCursor
  5. Using Git with coding agents - Agentic Engineering PatternsSimon Willison

Added Nov 14, 2026