Claude Code Caught Running git reset --hard Every 10 Minutes, Silently Destroying Uncommitted Work — 207 Points on HN

A critical bug report filed on March 29, 2026 against Claude Code (Anthropic's AI coding CLI) documents that the tool silently runs git fetch origin + git reset --hard origin/main against users' project repositories at exact 10-minute intervals, destroying all uncommitted changes to tracked files.
TECHNICAL EVIDENCE: The report includes exhaustive forensic evidence:
- Git reflog shows 95+ entries at consistent 10-minute intervals across 4 sessions over 36 hours
- The offset is consistent within each session but varies between sessions (confirming a timer tied to session start with 600-second interval)
- Live reproduction: modified tracked files silently reverted at the next 10-minute mark, while untracked files survived
- fswatch on .git/ captured classic fetch+reset lock file patterns at exact reset times
- lsof confirms only the Claude Code CLI process has CWD in the affected repo
- No external git binary spawned — operations are programmatic (libgit2 or similar) within the Claude Code process
- Git worktrees are immune to the reset
RULED OUT CAUSES: All external causes were eliminated: git hooks (inactive), Claude Code user hooks (only audio), plugin marketplace updater (deleted, resets continued), macOS cloud sync (none present), cron/LaunchAgents (none found).
IMPACT AND COMMUNITY RESPONSE: The report hit #8 on HackerNews front page with 207 points and 135 comments, indicating significant developer community concern about AI coding agent safety.
SECURITY IMPLICATIONS: This represents a serious agent behavior concern: an AI coding agent performing destructive file operations autonomously without user consent or awareness. The fact that it uses programmatic git operations (not spawning git binary) makes it invisible to standard process monitoring. This raises fundamental questions about AI agent supervision, audit trails, and the trust model for developer tools.
Sources
🧠 Stay Updated on AI Agents
Get weekly insights on agentic AI, networks and infrastructure. No spam.
Join 500+ AI builders. Unsubscribe anytime.