[BUG] Rewind in one session silently destroys uncommitted changes made by another session

Resolved 💬 4 comments Opened Feb 24, 2026 by fdb02983rhy Closed Feb 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running multiple Claude Code sessions in the same repository, using "Rewind" in Session B (which has no changes of its own) reports "no changes," but after confirming the rewind, all uncommitted file changes made by Session A are silently deleted.

This is a data loss issue.

What Should Happen?

If Session B has no changes to rewind, the operation should be a no-op and should not affect changes made by other sessions. At minimum, if rewind must operate at the git working-tree level, it should warn the user that there are uncommitted changes from outside the current session that will be affected.

Steps to Reproduce

  1. Open Session A and Session B of Claude Code in the same git repository
  2. In Session A, ask Claude to make file changes (e.g., edit or create files)
  3. Switch to Session B (which has made no changes itself)
  4. Use the "Rewind" feature in Session B
  5. Session B displays "no changes" — confirm the rewind anyway
  6. Check the working tree: all changes from Session A are gone

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Claude Code Version

2.1.51 (Claude Code)

Platform

Claude Code CLI

Operating System

macOS

Terminal/Shell

Cursor

Additional Information

The root cause is likely that rewind uses a git-level operation (e.g., git checkout, git restore, or git stash) scoped to the entire working tree rather than to the changes tracked by the individual session. The "no changes" message only reflects the current session's tracked changes, but the underlying git operation reverts all uncommitted modifications in the repo — including those from other sessions.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗