HN Amplifies a Git Hard-Reset Bug Report Against Claude Code

Original: Claude Code runs git reset --hard origin/main against project repo every 10 mins View original →

Read in other languages: 한국어日本語
AI Mar 30, 2026 By Insights AI (HN) 2 min read Source

On March 29, 2026, Hacker News quickly picked up GitHub issue #40710 in the anthropics/claude-code repository. The reporter alleges that Claude Code 2.1.87, running on macOS 15.4, repeatedly executed git fetch origin and git reset --hard origin/main against the user’s project repository at roughly 10-minute intervals. The alarming part is not only the command sequence itself but the claim that it happened through programmatic repository operations rather than an explicitly visible external git process.

The issue body is detailed enough to take seriously. The reporter says reflog entries showed more than 95 reset events over roughly 36 hours, each separated by about 600 seconds from the session start time. The practical outcome was also specific: tracked but uncommitted changes were wiped, untracked files survived, and Git worktrees were reportedly unaffected. That pattern suggests a targeted synchronization path hitting the main working tree rather than a total repository corruption event.

As of March 30, 2026, the issue remains open and the public follow-up is still investigative rather than conclusive. The first visible comment recommends checking MEMORY.md, local .claude/ folders, subfolder configuration, and any accidental artifact that could explain a 600-second timer. In other words, the public evidence currently supports a credible user report, but not yet a confirmed product root cause. It could still turn out to be a bug, a local configuration interaction, or a narrower edge case.

Why it still matters now

The HN reaction was strong because destructive repository mutation is a trust-boundary problem. There is a meaningful difference between an AI coding assistant reading repository state, proposing cleanup, or synchronizing metadata, and an assistant hard-resetting a live working tree without explicit consent. Once a tool crosses that line, capability no longer matters unless safety controls are equally strong.

  • Background automation should be weaker than repository safety, not the other way around.
  • Destructive Git actions need explicit approval and visible logging.
  • Worktrees, separate branches, and frequent commits remain practical mitigations for AI-assisted coding.

Because the vendor has not yet published a root-cause analysis, it would be premature to treat this as a settled product defect. Still, the March 29, 2026 discussion is important because it shows how fast confidence can collapse when an agentic tool appears to rewrite repository history on its own. The primary sources are the Hacker News thread and GitHub issue #40710.

Share: Long

Related Articles

Comments (0)

No comments yet. Be the first to comment!

Leave a Comment

© 2026 Insights. All rights reserved.