Documented entries use credited imagery cleared for publication · Concept entries are illustrative
AgentUI Gallery

05 Errors & recovery · Restore and replay

After /restore, Gemini CLI runs the undone edit again without asking

Gemini CLI · CLI

Gemini CLI terminal after running /restore. An info line reads "Restored project to the state before the tool call." Right below it, an edit to notes.md that adds the line "- Pick up stamps" is already marked Accepted, with no approval prompt in between.

Swipe to pan

Screenshot: original capture by AgentUI Gallery's AI assistant, directed by Summer Ordoñez, on Oct 26, 2026, for commentary. Unmodified. Software shown: Gemini CLI 0.65.0, © 2025 Google LLC, licensed under the Apache License 2.0. Product page: https://github.com/google-gemini/gemini-cli. The Apache License applies to the Gemini CLI software, not to this screenshot. Gemini is a trademark of Google LLC; AgentUI Gallery is not affiliated with or endorsed by Google. Software license · Credits & takedown

The insight

If undo brings an action back, ask before running it again. A silent replay undoes the undo.

Documented

from the source

Visible in the image: The Gemini CLI terminal right after /restore. The restored conversation shows the request to add "- Pick up stamps" to notes.md, and a finished ReadFile. Next comes the info line "Restored project to the state before the tool call." Directly under it: "Edit notes.md → Accepted (+1, -0)", with the diff line "6 + - Pick up stamps". No approval prompt sits between the restore and the edit. The footer shows the workspace, branch main, and the model. Observed on Gemini CLI 0.65.0, Oct 26, 2026.

  1. Before file-modifying tools run, Gemini CLI saves a Git snapshot in a shadow repository in your home directory.“It does not interfere with your own project's Git repository” — How it works
  2. /restore reverts your files, restores the conversation, and re-proposes the original tool call.“Re-propose the original tool call, allowing you to run it again, modify it, or simply ignore it.” — How it works
  3. Checkpointing is off by default and is enabled in settings.json.“The Checkpointing feature is disabled by default.” — Enabling the feature

Our read

design interpretation

Why it works

The rollback itself is clean. Files and conversation return to the moment before the edit. The shadow Git repo keeps recovery out of the user's own history.

Trade-off

The docs say the original tool call is re-proposed so you can run, change, or ignore it. In version 0.65.0 it ran again straight away, so the edit came back. To just undo an edit, use /rewind and choose "Revert code changes". That works without turning on checkpointing.

Steal this

  • After undo, hand back the next decision, and don't replay the action for the person.
  • Keep recovery data out of the user's own version history.

Source

Gemini CLI docs: Checkpointing

2026-10-26 · Accessed; checkpointing.md last changed 2026-04-10. Captured Oct 26, 2026 on Gemini CLI 0.65.0, Debian GNU/Linux 13 (trixie)

More entries