[BUG] /rewind shows "Restore code" option intermittently or fails to restore files

Status Open
Maintainer reply None cached
Activity 5 comments · opened Dec 15, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using /rewind to restore code to a previous checkpoint, the feature behaves inconsistently:

"Restore code" option is sometimes missing from the rewind menu
Partial restoration: Only some modified files are restored, not all of them
Debug logs show 0 files tracked at snapshot creation, even though file modifications occur afterward

What Should Happen?

The "Restore code" option should always appear when code changes exist
All file modifications made through Claude's editing tools should be restored to their previous state

Error Messages/Logs

Using claude -d2e 2> >(grep -i FileHistory > rewind.log):

2025-12-15T01:51:09.338Z [DEBUG] FileHistory: Added snapshot for 0c4e296c-c89b-43c6-a8d2-993aedc862d5, tracking 0 files
2025-12-15T01:51:27.357Z [DEBUG] FileHistory: Tracked file modification for /Users/xxx/Code/src/app/[locale]/page.tsx

Steps to Reproduce

  1. Ask Claude to modify a file (e.g., "Change the title color to blue in page.tsx")
  2. Wait for Claude to complete the modification using its file editing tools
  3. Run /rewind to view checkpoints
  4. Observed: "Restore code" option is missing, or selecting it only restores some files

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.69 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Checkpoints setting: Verified enabled in /config → "Rewind code (checkpoints)" is set to true
Edit method: Claude used its native file editing tools (not bash commands)

View original on GitHub ↗

4 Comments

rajinsyed · 8 months ago

still happening with 2.0.76.

Jbmanllr · 7 months ago

Same issue

ajwrigley · 7 months ago

@claude This is still happening. A large chunk of users are unable to use the revert code feature for several weeks now.

monsieurpooh · 2 months ago

I don't know if this is still happening because I just started using Claude Code, but the diffing and reverting logic seems suspiciously non-existent. When I rewind a conversation, it just does so without reverting any code changes. When I search about this, it claims that Claude Code used to have a feature where if you press rewind, you can choose between code vs conversation-only. That would make sense, but why then did it stay broken for months? Or am I just using it wrong?

Showing cached comments. Read the full discussion on GitHub ↗