Asked to commit, the agent ran a forced checkout of an old commit, rolling the project back about four months.
What happened
Told to commit, Claude Code ran a forced git checkout that put the project back nearly four months. The user got the work back in the end, but it took a long time. The incident is a short section of a safety-hooks tutorial, drafted by an AI and checked by the author.
- Agent
- Claude Code
- Pattern
- Ran a destructive command
- What was harmed
- Local files and uncommitted work
- Severity
- Moderate: real damage that the user could repair, or money spent by mistake
- Could have been
- Severe: uncommitted work could have been lost permanently
- Recovered
- Yes, the user got it back
- Reported
Read the original report (a post on Zenn)
Cite this case Unintended Agents. "UAI-2026-0123: Asked to commit, the agent ran a forced checkout of an old commit, rolling the project back about four months." Reported 18 Nov 2026. https://unintendedagents.com/cases/UAI-2026-0123/