[Bug] Rewind does not restore file content for untracked files edited in session

Status Open
Reported on v2.1.236
Maintainer reply None cached
Activity 0 comments · opened Sep 3, 2026

Bug Description
Summary: Rewinding to a past prompt does not offer any code-restore option and does not revert file content, even when a tracked edit exists after that prompt.

Repro:

  1. In a session, Claude creates a brand-new file via the Write tool (e.g. rewind_test.txt containing "rewind test v1"). File was never git-tracked.
  2. Send prompt: "edit it" — Claude edits the file via the Edit tool, content becomes "rewind test v2".
  3. Trigger rewind by typing /rewind. The menu lists the prompts sent in the session (not a restore-type picker).
  4. Select the "edit it" entry — it jumps straight there, dropping "edit it" back into the input box as a draft. There is no separate menu asking to restore conversation/code/both.

(note that this was already pretty confusing: I was expecting to the response to my last prompt but it jumped to the drafting of that prompt. But that's fine for now...)

  1. Ask Claude to read the file on disk: it still shows "rewind test v2" — the edit was not reverted.

Expected: Per docs (checkpointing.md), selecting a checkpoint should surface a restore-type menu (conversation / code / both), with code-restore options appearing whenever the selected checkpoint has tracked file changes to revert — checkpointing is documented as independent of git tracking status. Here there was a tracked edit (v1→v2, both done via Claude's own file tools, same session) after the selected prompt, so a code-restore option should have appeared and reverted the file to v1.

Actual: No restore-type menu appears at all — selecting the prompt just rewinds the conversation and drops it as a draft. File content is left unchanged at the post-edit ("v2") state.

Possible relevance: The file was newly created in this same session (never git added) — unclear if that, or the specific rewind flow used (would Esc Esc behave differently?), affects whether the restore-type menu appears.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.236
  • Feedback ID: 77d6fdfa-2719-41f0-a46a-1c1687edf1d6

Errors

[]

View original on GitHub ↗