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
    }
  }
}
circle-info

This setting is not available in the /settings dialog and must be set directly in the settings JSON file.

How It Works

1

Before file modification

Tabnine CLI creates a Git commit snapshot.

2

Tool executes

File changes are made.

3

Checkpoint saved

Snapshot information is stored in ~/.tabnine/agent/tmp/<project_hash>/checkpoints/.

4

Restore available

Use /restore to undo changes.

Using /restore

List 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\

circle-info

Checkpoints are project-specific based on your working directory.

Checkpointing vs /chat save

Feature

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

chevron-right"Checkpointing is enabled but Git service is not available"hashtag

Solution: Ensure Git is installed and your project is a Git repository:

chevron-right"Cannot restore checkpoint: commit hash not found"hashtag

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.

chevron-rightCheckpoints not being createdhashtag

Check:

  • Git is installed: git --version

  • You're in a Git repository: git status

  • Checkpointing is enabled in .tabnine/agent/settings.json:

circle-check

Best Practices:

Disabling Checkpointing

Edit .tabnine/agent/settings.json and set to false:

See Also

Last updated

Was this helpful?