Skip to content

History‑linked checkpoints and file state restore #2788

Open

Description

@mkusaka

What feature would you like to see?

Provide a mechanism that ties conversation history to file state:

  • Automatically create a checkpoint whenever the agent modifies files (e.g., via apply_patch or approved shell writes).
  • When jumping to a past message from history/backtrack, restore the workspace to the file state at that message. Make this restore behavior configurable: automatic or prompt/manual.

Implementation note

  • Backend is implementation‑agnostic. A Git‑based approach is one practical option, but any local snapshot store that can recreate exact file states is acceptable.

Slash commands (especially for manual mode)

  • /checkpoint restore <message-id|checkpoint-id> → Restore files to the state associated with a specific history message or checkpoint (confirmation shown).
  • /checkpoint save [message] → Optional manual checkpoint at the current workspace state.
  • /checkpoint mode auto|manual → Toggle restore behavior when navigating history/backtrack.

Are you interested in implementing this feature?

Potentially—happy to help refine the design and contribute an implementation once maintainers confirm the scope and preferred storage backend.

Additional information

Inspiration: Gemini CLI checkpointing (conceptual prior art): https://github.com/google-gemini/gemini-cli/blob/main/docs/checkpointing.md

Activity

  1. added
    enhancement
    on Aug 27, 2025
  2. ssanumand commented on Oct 15, 2025

    @ssanumand

    I'm too waiting for this feature. Thanks for brining it out. Any idea on when it'll release?

  3. Jiabinone commented on Nov 13, 2025

    @Jiabinone

    I'm also looking forward to this useful feature.

  4. hmottestad commented on Jan 23, 2026

    @hmottestad

    This would be awesome!

  5. added
    agent
    on Mar 26, 2026
  6. added
    session
    and removed
    agent
    on Apr 11, 2026
  7. anywaypridyrok commented on Jun 24, 2026

    @anywaypridyrok

    Disclosure: I’m building DiffReceipt, a receipt layer for AI-agent code changes.

    History-linked checkpoints are the right direction. The thing I’d want as a user is a visible connection between conversation history, file state, and review evidence.

    For each checkpoint, a receipt could include:

    • conversation turn / task
    • snapshot id
    • files touched
    • diff summary
    • checks run
    • what restore will and will not affect

    This makes checkpoints useful for human review too, not only for emergency rollback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions