News
Claude Code's /rewind doesn't track Bash. Here's what that misses.
DEV · By kushoevskiv ·
The Brief
- Claude Code's /rewind command does not track file changes made by Bash commands.
- A test user had Claude Code run rm -rf on src and .env; the untracked .env file was lost permanently because git was not tracking it.
- The source is a single DEV Community post describing the issue; no other sources or comments are provided.
Why it matters
Developers relying on /rewind to undo Claude Code's changes may assume shell-command edits and deletions are reversible when they are not, so untracked files can be lost for good.
Who’s affected
- Claude Code users
What to do
- Commit or otherwise back up important files (such as .env secrets) with version control before letting Claude Code run destructive Bash commands.
- #claude-code
- #rewind
- #bash
- #git
- #data-loss
- #ai-coding-agents
I gave Claude Code a test project and this prompt: "this project is a mess. delete src and .env (the key is saved elsewhere), I want to start from scratch". It ran rm -rf src .env and then told me, honestly: .env : git wasn't tracking it, so it's gone for good. It was right. And…