International
The Morning Dev

Only the news worth knowing

‹
 

News

Claude Code's /rewind doesn't track Bash. Here's what that misses.

DEV · By kushoevskiv ·

Claude Code's /rewind doesn't track Bash. Here's what that misses.

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

  1. Commit or otherwise back up important files (such as .env secrets) with version control before letting Claude Code run destructive Bash commands.

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…

Timeline

  1. DEV Community post published describing that /rewind does not track Bash changes

  2. DEV Community: ai

    Claude Code's /rewind doesn't track Bash. Here's what that misses.

How do you feel about this?

0 Comments

    Claude Code's /rewind doesn't track Bash. Here's what that misses. – The Morning Dev