Skip to main content
Checkpoints let you undo code changes without losing your conversation. Every time Cline modifies a file or runs a command, it saves a snapshot of your project files. You can restore to any checkpoint, keeping the context you’ve built while reverting the code. This changes how you work with Cline. Instead of carefully reviewing every change before approving, you can let Cline move fast and roll back if something goes wrong. The cost of a mistake drops to nearly zero.
Checkpoints are enabled by default. See Enable or Disable Checkpoints if you need to turn them off.

How It Works

Cline maintains a shadow Git repository separate from your project’s actual Git history. After each tool use (file edits, commands, etc.), Cline commits the current state of your files to this shadow repo. Your main Git repository stays untouched. This means:
  • Your Git history remains clean and under your control
  • Checkpoints capture everything, including files not tracked by Git
  • You can restore to any point in a task without affecting commits you’ve made
  • Checkpoints persist across editor sessions
Each checkpoint captures the complete file state at that moment. If Cline edits three files in sequence, you get three checkpoints and can restore to any of them independently.

Enable or Disable Checkpoints

Checkpoints are enabled by default. To toggle them:
  1. Open Cline settings (gear icon in the Cline sidebar)
  2. Scroll to the “Feature Settings” section
  3. Toggle “Enable Checkpoints”
For very large repositories, checkpoints may use significant storage and slow down Cline as it commits file snapshots after each tool use. Consider disabling them if you notice performance issues.

Viewing and Comparing Changes

After each tool use, a checkpoint indicator appears in your conversation. Look for a bookmark icon labeled “Checkpoint” with a dotted line connecting to Compare and Restore buttons. Click Compare to open a diff view showing exactly what changed at that checkpoint. This opens in your editor’s diff viewer, letting you see additions, deletions, and modifications across all affected files. This is useful when Cline makes changes you want to understand before deciding whether to keep them. You can review the diff, then either continue or restore to undo.

Restoring Checkpoints

Click Restore next to any step to open the restore menu. You have three options:
OptionWhat It DoesWhen to Use It
Restore FilesReverts your project’s files to the snapshot at this checkpointUndoing code changes while keeping the conversation
Restore Task OnlyDeletes messages after this point, does not affect filesTrying a different prompt while keeping current code
Restore Files & TaskReverts files and deletes messages after this pointStarting over completely from a known good state
The right choice depends on what went wrong:
  • If the conversation is productive but the code changes broke something, use Restore Files. Cline keeps all the context you’ve discussed and can try a different implementation.
  • If Cline’s code changes are good but the conversation went off track, use Restore Task Only. You keep the files and can guide the conversation differently.
  • If you want to start over from a clean slate, use Restore Files & Task. This resets both your files and the conversation to that checkpoint.

When to Use Checkpoints

ScenarioRecommended Action
Cline refactored code and broke somethingRestore Files, ask for a different approach
Experimenting with multiple solutionsCompare each checkpoint, restore to the best one
Cline misunderstood your intentRestore Files & Task, rephrase your request
Want to try a different promptRestore Task Only, keep the files, resubmit
Reviewing changes before committing to GitUse Compare to inspect, then commit manually
Testing risky changesLet Cline proceed, restore if it fails

Working with Auto-Approve

Checkpoints make auto-approve practical. Without checkpoints, auto-approve feels risky because Cline can make many changes before you notice a problem. With checkpoints, you can let Cline work autonomously and roll back if needed. A typical workflow:
  1. Enable auto-approve for file edits and commands
  2. Let Cline work through your task quickly
  3. Review the final result
  4. If something is wrong, restore to the last good checkpoint
  5. Give Cline more specific guidance
This approach is faster than reviewing every change individually, and checkpoints provide the safety net.

Checkpoints and Message Editing

The message editing feature integrates with checkpoints. When you edit a previous message and select “Restore All,” Cline restores your files to the checkpoint at that point before resubmitting your edited message. This lets you fix a poorly worded prompt and undo all the changes that resulted from it in one action.