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.
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.
After each tool use, you can:
- Click
Compareto see modified files. - Click
Restoreto open restore options.
To restore to a previous point:
- Click
Restorenext to any step. - Choose from three options:
- Use
Restore Files and Taskfor a fresh start. - Use
Restore Task Onlyto try different prompts, but keep file changes. - Use
Restore Files Onlyto 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.
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.
- Provides safety net for rapid iterations.
- Makes it easy to undo unexpected results.
- Try multiple solutions confidently.
- Compare different implementations.
- Quickly revert to working states.
- Ideal for exploring different design patterns or architectural approaches.
- Use checkpoints as safety nets when experimenting.
- Leverage auto-approve mode more confidently, knowing you can always roll back.
- Restore selectively based on needs.
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.