Overview
Automatically track and revert CodeBuddy edits to quickly restore unwanted changes. CodeBuddy Code automatically tracks CodeBuddy edits to your files as you work, allowing you to quickly undo changes and revert to a previous state when issues occur.
How Checkpoints Work
When you collaborate with CodeBuddy, the checkpoint feature automatically captures the state of your code before each edit. This safety net allows you to confidently perform large-scale tasks because you can revert to a previous code state at any time.
Automatic Tracking
CodeBuddy Code tracks all changes made by its file editing tools:
Each user prompt creates a new checkpoint.
Checkpoints are persisted across sessions, so you can access them in restored conversations.
Checkpoints are automatically cleaned up with the session after 30 days (configurable).
Rolling Back Changes
Use the /rewind command to open the rewind menu. You can choose to restore:
Conversation only: Rewind to a user message while preserving code changes.
Code only: Revert file changes while preserving the conversation.
Code and conversation: Restore both to a previous point in the session.
Common Scenarios
Checkpoints are especially useful in the following scenarios:
Explore alternatives: Try different implementation approaches without losing your starting point.
Recover from mistakes: Quickly undo changes that introduced bugs or broke features.
Feature iteration: Feel free to experiment, knowing that you can restore to a working state.
Limit
Changes to Bash Commands Are Not Tracked
Checkpoints do not track files modified through bash commands. For example, if CodeBuddy Code runs:
rm file.txt
mv old.txt new.txt
cp source.txt dest.txt
These file modifications cannot be undone through the rewind feature. Only edits made directly through CodeBuddy's file editing tools are tracked.
External Changes Are Not Tracked
Checkpoints only track files that have been edited in the current session. Changes you make to files manually outside of CodeBuddy Code, as well as edits from other concurrent sessions, are typically not captured unless they happen to modify the same files as the current session.
Not a Replacement for Version Control
Checkpoints are designed for fast session-level recovery. For permanent version history and collaboration:
Continue to use version control (such as Git) to manage commits, branches, and long-term history.
Checkpoints complement version control rather than replace it.
You can think of checkpoints as "local undo," while Git is "permanent history."
See Also