[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)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗