---
schema_version: "1"
id: e37a486ac2859912edad2bc2b6ed926eef2d076039582d2873ed3500ff0c6736
title: Checkpoints
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/einsteinfordevs/guides/files/checkpoints.md
canonical_url: https://developer.salesforce.com/docs/platform/einstein-for-devs/guide/checkpoints.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c17ed3d0a3edc870ae5679c2bca3ca38cc9faa85c2b045796c6766247daa1c2a
products:
  - Agentforce Vibes Developer Guide (Deprecated)
  - salesforcedx
---
# Checkpoints

Checkpoints automatically save snapshots of your workspace after each step in a task. Checkpoints let you track changes, roll back when needed, and experiment confidently with your code. You must install and connect to Git to use checkpoints.

## How Checkpoints Work

Agentforce creates a checkpoint after each tool use, such as file edits, commands, and so on. These checkpoints:

- Work alongside your Git workflow without interference.
- Maintain context between restores.
- Use a shadow Git repository to track changes.

For example, if you're working on a feature and Agentforce makes multiple file changes, each change creates a checkpoint. This means you can review each modification and, if needed, roll back to any point without affecting your main Git repository.

## View and Restore Changes

After each tool use, you can:

- Click `Compare` to see modified files.
- Click `Restore` to open restore options.

## Restore Options

To restore to a previous point:

1. Click `Restore` next to any step.
2. Choose from three options:

- Use `Restore Files and Task` for a fresh start.
- Use `Restore Task Only` to try different prompts, but keep file changes.
- Use `Restore Files Only` to attempt different implementations while preserving conversation context.

Example: If Agentforce makes changes you don't like while styling a component, you can use `Restore Files` to revert the code changes while keeping the conversation context, allowing you to try a different approach.

## Use Cases

Checkpoints let you be more experimental with Agentforce. While human coding is often methodical and iterative, AI can make substantial changes quickly. Checkpoints help you track these changes and revert if needed.

### Use With Auto-Approve Mode

- Provides safety net for rapid iterations.
- Makes it easy to undo unexpected results.

### Test Different Approaches

- Try multiple solutions confidently.
- Compare different implementations.
- Quickly revert to working states.
- Ideal for exploring different design patterns or architectural approaches.

## Best Practices

- Use checkpoints as safety nets when experimenting.
- Leverage auto-approve mode more confidently, knowing you can always roll back.
- Restore selectively based on needs.

## Relationship with Message Editing

The message editing feature uses checkpoints under the hood when you select the `Restore All` option. This option allows you to edit and resubmit your message, and also restore your workspace to the state it was in at that point in the conversation.
