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
}
}
}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\
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
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?
