October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

Claude Code /rewind: What It Can—and Can’t—Recover After Bash

Claude Code’s /rewind is not a general undo for Bash. Here’s what its checkpoint scope means for deleted files, and which independent safeguards may help.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

/rewind is not a general undo button for shell commands. Claude Code describes it as returning the conversation and/or code to an earlier checkpoint, but Bash command changes such as moving a file are outside the checkpoint tracking described in Anthropic documentation quoted in a GitHub issue. If Bash deleted or overwrote something, do not count on /rewind to restore it.

What Claude Code’s /rewind does

Anthropic’s Claude Code cheatsheet and command reference describe /rewind as returning the conversation and/or code to an earlier checkpoint. The cheatsheet also lists pressing Esc twice to open the rewind/checkpoint menu.

As an Amazon Associate I earn from qualifying purchases.

That scope matters: a checkpoint can help with eligible code edits, but it does not mean Claude Code has a snapshot of every change made to the computer while a session is running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why Bash deletions are different

A Claude Code GitHub issue quotes checkpointing documentation stating that changes made by Bash commands are not tracked, using mv old.txt new.txt as an example of a change that cannot be undone through rewind. A command such as rm can likewise remove a file outside the documented checkpoint coverage. Therefore, running /rewind should not be treated as a way to retrieve files deleted by Bash.

This is a boundary on what the documented feature covers, not proof that a deleted file is impossible to recover from every source. A Git repository, backup, filesystem snapshot, or other independent copy may still contain it. The available sources do not establish a universal recovery procedure for files deleted by shell commands.

What to do if Bash already removed a file

  1. Stop relying on /rewind as the recovery mechanism. It can rewind eligible conversation or code changes, but the documented scope does not cover Bash side effects.
  2. Check independent copies. Look in the project’s Git history, backups, or filesystem snapshots if you have them. Which one can help depends on what was configured before the deletion.
  3. Avoid writing to the affected storage if the file is important. The sources here do not specify a recovery method or guarantee that deleted data can be restored; avoid assuming a particular tool will succeed.

How to reduce the risk next time

Keep an independent copy

Use version control or a separate backup before asking an agent to run destructive commands. These safeguards are distinct from Claude Code checkpoints: they provide a recovery source outside the conversation’s rewind feature.

Consider command-level snapshots for shell side effects

Tools in this category aim to capture changes around shell commands and provide command-level undo. The bashback project page describes snapshots and undo for side effects such as rm and mv. That is the project publisher’s description, not an independently verified guarantee; do not treat it as equivalent to Anthropic’s built-in checkpointing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check whether file checkpointing is disabled

Anthropic’s environment-variable reference says that setting CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING disables file checkpointing, which prevents /rewind from restoring code changes. The reference describes the effect when the variable is set; it does not establish that it is enabled by default.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

A reported exception is not a recovery feature

The GitHub issue also describes one user’s report that a tracked file moved with Bash unexpectedly reappeared in a particular environment. The report calls the behavior unexpected and does not overturn the documented scope or establish that rewind generally restores Bash changes. Treat it as an isolated, surprising interaction—not a recovery method to depend on.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.