[BUG] /rewind shows "Restore code" option intermittently or fails to restore files
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
- Ask Claude to modify a file (e.g., "Change the title color to blue in page.tsx")
- Wait for Claude to complete the modification using its file editing tools
- Run /rewind to view checkpoints
- 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)
Showing cached comments. Read the full discussion on GitHub ↗
4 Comments
still happening with 2.0.76.
Same issue
@claude This is still happening. A large chunk of users are unable to use the revert code feature for several weeks now.
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?