Features

Rollback

Automatically version workspace files during AI tasks. Safely explore AI suggestions and experiment with changes, and easily recover from unwanted changes.

What is rollback

Rollback lets you:

  • Safely experiment with AI-suggested changes
  • Easily recover from undesired modifications
  • Compare different implementation approaches
  • Revert to previous project states without losing work

How rollback works

Bob captures snapshots of your project's state using a shadow Git repository, separate from your main version control system. These snapshots are automatically created before file modifications occur, ensuring you can always undo unwanted changes.

Snapshots are recorded when tasks begin and before file modifications. They are not automatically created before running commands.

Working with rollback

Rollback is integrated directly into your workflow through the chat interface and appears directly in your chat history:

  • A task snapshot marks your starting project state.
  • Snapshots are created before file modifications, allowing easy undo of any changes.

Each snapshot provides two primary functions that are always available in both the chat history and the rollback menu:

Viewing differences

To compare your current workspace with a previous snapshot:

  1. Locate the snapshot in your chat history or open the rollback menu.
  2. Click View differences.
  3. Review the differences in the comparison view:
    • Added lines are highlighted in green.
    • Removed lines are highlighted in red.
    • Modified files are listed with detailed changes.
    • Renames may not always be detected; diffs reflect per-file changes between snapshots.
    • New or deleted files are clearly marked.

Restoring a snapshot

Restore options are always visible in rollback buttons and dialogs, regardless of whether changes are detected. This ensures you can always revert to any snapshot state.

To restore a project to a previous state:

  1. Locate the snapshot in your chat history or rollback menu.
  2. Click Rollback.
  3. Choose one of the following restoration options:

Restore files: Reverts only workspace files to the snapshot state without modifying conversation history. This is ideal for comparing alternative implementations while maintaining chat context. This option does not require confirmation.

Restore files and task: Reverts both workspace files and removes all subsequent conversation messages. Use this option when you want to completely reset both your code and conversation to the snapshot's point in time. This option requires confirmation and cannot be undone.

Limitations

  • Scope: Rollback only captures changes made during active Bob tasks.
  • External changes: Modifications made outside of tasks (manual edits, other tools) are not included.
  • Large files: Very large binary files may affect performance.
  • Unsaved work: Restoration overwrites any unsaved changes in your workspace.
  • Timing: Snapshots are created before changes are applied, providing a safety net for all modifications.
  • Memory usage: Snapshots accumulate over time and can consume significant memory, especially for large projects or long-running tasks. If you have many old tasks with snapshots, consider clearing them periodically to free up memory. You can do this by deleting old task conversations, which removes their associated snapshots.

Technical implementation

Rollback architecture

The rollback system consists of:

  1. Shadow Git repository: A separate Git repository created specifically for rollback tracking that functions as the persistent storage mechanism for snapshot state.
  2. Rollback service: Handles Git operations and state management through:
    • Repository initialization
    • Snapshot creation and storage
    • Diff computation
    • State restoration
  3. UI components: Interface elements displayed in the chat that enable interaction with rollback.

Restoration process

When restoration runs, Bob:

  • Completes a reset to the specified snapshot commit.
  • Copies all files from the shadow repository to your workspace.
  • Updates internal rollback tracking state.

Storage type

Rollback is task-scoped, meaning each snapshot is specific to a single task.

Diff computation

Rollback comparison uses Git's underlying diff capabilities to produce structured file differences:

  • Modified files show line-by-line changes.
  • Binary files are properly detected and handled.
  • Rename detection may be limited; diffs focus on file content changes between snapshots.
  • File creation and deletion are clearly identified.

File exclusion and ignore patterns

The rollback system uses intelligent file exclusion to track only relevant files.

Built-in exclusions

The system has built-in exclusion patterns that automatically ignore:

  • Build artifacts and dependency directories (node_modules/, dist/, build/).
  • Media files and binary assets (images, videos, audio).
  • Cache and temporary files (.cache/, .tmp/, .bak).
  • Configuration files with sensitive information (.env).
  • Large data files (archives, executables, binaries).
  • Database files and logs.

These patterns are written to the shadow repository's .git/info/exclude file during initialization.

.gitignore support

The rollback system respects .gitignore patterns in your workspace:

  • Files excluded by .gitignore do not trigger snapshot creation.
  • Excluded files do not appear in rollback diffs.
  • Standard Git ignore rules apply when staging file changes.

Git LFS patterns

Patterns defined in your workspace's .gitattributes for Git LFS are read and added to rollback exclusions. This helps avoid tracking large LFS-managed assets in the shadow repository.

.bobignore behavior

The .bobignore file (which controls AI access to files) is separate from rollback tracking:

  • Files excluded by .bobignore but not by .gitignore are still captured by rollback.
  • Changes to AI-inaccessible files can still be restored through rollback.

This separation is intentional. .bobignore limits which files the AI can access, not which files should be tracked for version history.

Disabling rollback

To enable or disable rollback:

  1. Open Settings by clicking the gear icon.
  2. Click the Chat tab and find Rollback near the bottom of the panel.

Nested Git repositories

If nested Git repositories are detected in your workspace, rollback is disabled. You receive a clear notification when rollback initialization fails due to nested repositories. Remove or relocate nested repositories to enable rollback.

Concurrency control

The extension prevents duplicate snapshot creation within a single streaming operation. There is no dedicated Git operation queue.

Git installation

Rollback requires Git to be installed on your system. The implementation uses the simple-git library, which relies on Git command-line tools to create and manage shadow repositories.

Install Git with Homebrew (recommended)

brew install git

Alternative: Install Xcode Command Line Tools:

xcode-select --install

Verify the installation

  1. Open Terminal.
  2. Run git --version.
  3. Confirm that a version number is displayed, for example git version 2.40.0.

Download Git for Windows

  1. Go to https://git-scm.com/download/win. The download starts automatically.

Run the installer

  1. Accept the license agreement.
  2. Choose an installation location (the default is recommended).
  3. Select components (the default options are sufficient for most users).
  4. Choose the default editor.
  5. Choose how to use Git from the command line (recommended: Git from the command line and also from 3rd-party software).
  6. Configure line ending conversions (recommended: Checkout Windows-style, commit Unix-style).
  7. Complete the installation.

Verify the installation

  1. Open Command Prompt or PowerShell.
  2. Run git --version.
  3. Confirm that a version number is displayed, for example git version 2.40.0.windows.1.

Install Git using your distribution's package manager

  • Debian/Ubuntu:
sudo apt-get update
sudo apt-get install git
  • Fedora:
sudo dnf install git
  • Arch Linux:
sudo pacman -S git

Verify the installation

  1. Open Terminal.
  2. Run git --version.
  3. Confirm that a version number is displayed.
How is this topic?