[MODEL] git stash/pop run for an unrelated build check silently destroyed the user's staged index
Status Open
Reported on v2.1.229
Maintainer reply None cached
Activity 0 comments · opened Aug 13, 2026
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude reverted/undid previous changes without asking
What You Asked Claude to Do
I asked Claude to refactor a piece of code that was working around case-sensitivity instead of simply using C#'s IgnoreCase comparisons.
What Claude Actually Did
- Claude made requested changes
- Claude noticed potentially pre-existing build analyzer warnings it wanted to validate were pre-existing
- As usual, Claude loves to git stash to confirm this (
git stash -q-> dotnet build ->git stash pop) - The git pop operation discarded the index, destroying the user's manual work staging certain changes separately from the unstaged changes
Expected Behavior
Auto mode SHOULD HAVE BLOCKED the git operation, because it was destructive
Files Affected
Modified:
- My entire git index
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
Any code work where Claude notices something at the final build and wants to verify it's pre-existing
Claude Model
Opus
Relevant Conversation
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.1.229 (Claude Code)
Platform
Anthropic API
Additional Context
_No response_