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 while keeping all the context you’ve built up in chat. 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 checkpoints work

Cline maintains a shadow Git repository that is completely separate from your project’s own Git history. After each tool use — file edits, commands, and so on — 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 all files, including ones not tracked by Git
  • You can restore to any point in a task without affecting commits you’ve already 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

1

Open Cline settings

Click the gear icon in the Cline sidebar.
2

Find Feature settings

Scroll to the Feature Settings section.
3

Toggle checkpoints

Toggle Enable Checkpoints on or off.
For very large repositories, checkpoints may use significant storage and slow down Cline slightly 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 — a bookmark icon labeled Checkpoint with 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. Review the diff, then either continue or restore.

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 files to the snapshot at this checkpointCode changes broke something but the conversation is still productive
Restore Task OnlyDeletes conversation messages after this point, does not touch filesCode changes are good but the conversation went off-track
Restore Files & TaskReverts files and deletes messages after this pointStarting over completely from a known-good state

Choosing the right restore option

Use Restore Files. Cline keeps all the context from your conversation and can try a different implementation approach without you needing to re-explain the goal.
Use Restore Task Only. Your file changes are preserved and you can guide the conversation in a different direction from that point.
Use Restore Files & Task. This resets both files and the conversation to the checkpoint, giving you a clean slate from a known-good state.

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
You 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

Checkpoints and 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.
1

Enable auto-approve

Turn on auto-approve for file edits and commands in Cline settings.
2

Let Cline work

Cline moves through the task quickly without waiting for approval at each step.
3

Review the final result

Inspect the outcome once Cline finishes. Use Compare on any checkpoint to review what changed.
4

Restore if needed

If something went wrong, restore to the last good checkpoint and give Cline more specific guidance.

Checkpoints and message editing

Checkpoints integrate with message editing. 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 automatically undo all the file changes that resulted from it — in a single action.

Build docs developers (and LLMs) love