[Feature Request] Add checkpoint / rewind support (restore conversation + file state to previous turn)
Feature Request: Add checkpoint / rewind support (restore conversation + file state to a previous turn)
What problem are you trying to solve?
Currently, when the AI makes a series of file edits that go in the wrong direction, there is no easy way to atomically revert both the conversation and the code back to a specific point.
Claude Code solves this elegantly with its Checkpoint/Rewind feature:
- Every user prompt automatically creates a checkpoint
- Double-press
Escor run/rewindto open a history menu - Choose a turn and select:
- Restore code and conversation — revert files + rewind chat
- Restore conversation only — keep files, rewind chat
- Restore code only — revert files, keep chat
What is the desired behavior?
I would like kimi-code to support a similar checkpoint mechanism. Specifically:
- Automatic checkpoints: Before each turn (or before each file-modifying tool call), silently save a snapshot of modified files.
/rewindcommand (or double-ESC): Open an interactive menu listing historical turns.- Restore options:
- Restore conversation + code (full rewind)
- Restore conversation only
- Restore code only
- Scope limitation: Similar to Claude Code, changes made by
Shelltool or manual external edits may be out of scope for tracking.
Why is this important?
In long agentic coding sessions, the AI often goes down a wrong path after several turns. Without checkpoint rewind, users must:
- Manually
git diffandgit checkoutto revert files - Or abandon the session and start over
- Or leave the working directory in a messy state
This breaks the flow of iterative AI-assisted development.
Alternatives considered
/compact: This compresses context but does not revert state.- Manual git: Requires users to remember to commit before every prompt, which is unrealistic.
Additional context
If full automatic checkpointing is too heavy for the initial implementation, a lighter version could be:
- Only track files modified via
WriteFile/StrReplaceFiletools - Store diffs in session metadata
- Expose
/rewindas a CLI command first, TUI shortcut later
Thank you for considering this!
Yes, there is a similar rollback in CURSOR, very convenient