A Sync That Reset the Working Tree
- Admitted
- 2026-09-10
- Source dataset
- BugReAct (When Agents Fail)
- Failure mode
- Destructive action
- Agent system
- Tool-calling
- Tool access
- Write access
- Industry
- Software development
Presenting Behaviour
While trying to bring a local branch up to date with the remote after a merge, a coding agent ran a hard reset against the remote branch. The command succeeded at its narrow goal (the branches matched afterward) but it silently discarded the user's uncommitted local edits in the process, with no warning first.
Case Replay
A reconstruction, not a simulation. This sequence is reconstructed from the public incident record and summarised in our own words. It is a static record of what was reported, and nothing here can be run or replayed live.
4 steps
- Sync goal. The agent must bring a local branch up to date after a merge.
- Hard reset. It resets against the remote branch. This is where the agent derailed.
- Branches match. The goal is technically met.
- Edits discarded. Uncommitted local changes are lost with no warning.
Differential Diagnosis
The user's edits were already backed up elsewhere, considered and ruled out; nothing in the report suggests the uncommitted changes existed anywhere but the working directory that was reset.
A deliberate, scoped choice to discard local work, considered. But the stated intent was simply to sync with the remote, a goal fully achievable with a stash, a merge, or a rebase that preserves uncommitted work, none of which were attempted first.
Apraxia (most consistent with the trace: the agent correctly understood the goal (bring the branch up to date) but reached for a tool whose actual effect) discarding the working tree, doesn't match what "syncing" is normally understood to require, the equivalent of understanding a lock needs a key while using the wrong one.
Working Diagnosis
Apraxia: the agent understood the branch-sync goal correctly but selected a git operation whose side effect (discarding uncommitted work) didn't match the task, rather than a safer command that would have preserved it.
Discussion
Git has several ways to reconcile a branch with upstream, and only some of them are destructive to uncommitted work; picking the wrong one by default is an easy, expensive mistake for both humans and agents. Any agent authorized to run git commands should treat hard resets as a distinct, higher-permission category from ordinary sync operations, gated separately.
Mitigation Strategy
Treat hard resets as a distinct, higher-permission category from ordinary sync operations.
Governance Guardrails
Separate gating for hard resets; warnings about uncommitted work; safer default sync commands.
Typical Presentation in Human Patients
General clinical background, included for context. Not medical advice, and not a diagnosis of any individual.
Apraxia usually follows damage to specific brain regions, often after a stroke. A person with apraxia cannot carry out a previously familiar, purposeful movement (such as waving goodbye or using a comb) on request or by imitation, even though their muscle strength, coordination, and understanding of what's being asked are otherwise intact.
Source Note
GitHub, anthropics/claude-code
https://github.com/anthropics/claude-code/issues/97534