Checkpointing
Checkpointing automatically creates snapshots of your project before file-modifying tools execute, allowing you to undo changes.
What is Checkpointing?
When checkpointing is enabled, Tabnine CLI creates a Git snapshot before any tool that modifies files (like write_file, replace) is executed. This allows you to restore your project to its previous state using the /restore command.
Requirements
Git installed and available in your PATH
A Git repository initialized in your project directory
Enable via Settings File
Edit .tabnine/agent/settings.json (global: ~/.tabnine/agent/settings.json or project: .tabnine/agent/settings.json):
{
"general": {
"checkpointing": {
"enabled": true
}
}
}This setting is not available in the /settings dialog and must be set directly in the settings JSON file.
How It Works
Before file modification
Tabnine CLI creates a Git commit snapshot.
Tool executes
File changes are made.
Checkpoint saved
Snapshot information is stored in ~/.tabnine/agent/tmp/<project_hash>/checkpoints/.
Restore available
Use /restore to undo changes.
Using /restore
/restoreList Available Checkpoints
Shows a list of recent file modifications that can be undone.
Restore a Specific Checkpoint
Restores files to the state before that tool was executed.
Example output:
Then run:
Checkpoint Storage
Checkpoints are stored in:
Linux/macOS:
~/.tabnine/agent/tmp/<project_hash>/checkpoints/Windows:
C:\Users\<YourUsername>\.tabnine\agent\tmp\<project_hash>\checkpoints\
Checkpoints are project-specific based on your working directory.
Checkpointing vs /chat save
/chat saveFeature
Checkpointing
/chat save
Purpose
Undo file changes
Save conversation state
Automatic
Yes (before file mods)
No (manual)
Restore with
/restore <id>
/chat resume <tag>
What's saved
Git snapshot
Conversation history
Location
~/.tabnine/agent/tmp/.../checkpoints/
~/.tabnine/agent/tmp/.../
Troubleshooting
"Checkpointing is enabled but Git service is not available"
Solution: Ensure Git is installed and your project is a Git repository:
"Cannot restore checkpoint: commit hash not found"
Cause: The Git commit was removed (e.g., repo re-cloned, history rewritten).
Solution: Checkpoints rely on Git history. If the repository was reset or re-cloned, old checkpoints cannot be restored.
Checkpoints not being created
Check:
Git is installed:
git --versionYou're in a Git repository:
git statusCheckpointing is enabled in
.tabnine/agent/settings.json:
Best Practices:
Keep Git history: Avoid force-pushing or rewriting history if you need checkpoints
Regular commits: Make manual commits for important milestones
Cleanup: Old checkpoint files can be manually deleted from
~/.tabnine/agent/tmp/Backup: Checkpoints are local; use Git remotes for actual backups
Disabling Checkpointing
Edit .tabnine/agent/settings.json and set to false:
See Also
Last updated
Was this helpful?
