Checkpointing (Beta) β
β οΈ Beta Feature: Checkpointing is currently in Beta and features may change.
Overview β
Automatically track and rewind CodeBuddy edits to quickly restore unwanted changes.
CodeBuddy Code automatically tracks CodeBuddy's edits to files as you work, allowing you to quickly undo changes and revert to a previous state if something goes wrong.
How Checkpointing Works β
When you collaborate with CodeBuddy, the checkpointing feature automatically captures the state of your code before each edit. This safety net lets you confidently perform large-scale tasks knowing you can always restore to a previous code state.
Automatic Tracking β
CodeBuddy Code tracks all changes made by its file editing tools:
- Each user prompt creates a new checkpoint
- Checkpoints persist across sessions, allowing you to access them in resumed conversations
- Checkpoints are automatically cleaned up after 30 days per session (configurable)
Rewinding Changes β
In the terminal, use the /rewind command (or press Esc twice in the input box) to open the rewind menu. In the Web UI, hover over any user message and click "Rewind to here." Both entry points use the same checkpoints and rewind semantics. You can choose to restore:
- Conversation Only: Rewind to a specific user message while preserving code changes (after rewinding, the message is placed back in the input box so you can edit and resend it)
- Code Only: Restore file changes while preserving the conversation
- Both Code and Conversation: Restore both to a previous point in the session
Common Use Cases β
Checkpointing is particularly useful in these scenarios:
- Exploring Alternatives: Try different implementation approaches without losing your starting point
- Recovering from Errors: Quickly undo changes that introduced bugs or broke functionality
- Feature Iteration: Confidently experiment knowing you can always restore to a working state
Limitations β
Changes via Bash Commands Are Not Tracked β
Checkpointing does 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.txtThese file modifications cannot be undone via the rewind feature. Only edits made directly through CodeBuddy's file editing tools are tracked.
External Changes Are Not Tracked β
Checkpointing only tracks files edited in the current session. Manual changes you make to files outside of CodeBuddy Code, and edits from other concurrent sessions, are typically not captured unless they happen to modify the same files as your current session.
Not a Replacement for Version Control β
Checkpointing is designed for quick session-level recovery. For permanent version history and collaboration:
- Continue using version control (like Git) to manage commits, branches, and long-term history
- Checkpointing complements version control rather than replacing it
- Think of checkpointing as "local undo" and Git as "permanent history"
See Also β
- Interactive Mode - Keyboard shortcuts and session control
- Slash Commands - Use
/rewindto access checkpoints