HeadlinesBriefing favicon HeadlinesBriefing.com

Claude Code's Silent Git Reset Bug Overwrites Uncommitted Changes

Hacker News •
×

Users of Claude Code, an AI-powered development tool, report a critical bug where the application silently executes `git reset --hard origin/main` every 10 minutes on project repositories. This operation overwrites uncommitted changes in tracked files while leaving untracked files and git worktrees unaffected. Evidence from git reflogs shows 95+ reset entries across 36 hours, with timestamps varying by session but maintaining strict 600-second intervals.

Technical analysis confirms the reset originates from within the Claude Code process (PID 70111) without spawning external git binaries, ruling out cron jobs, IDEs, or third-party plugins. Worktree isolation and frequent committing emerged as immediate workarounds after developers discovered changes vanished during a 2-hour debugging session. The mystery persists: how does Claude Code's compiled Bun binary trigger these programmatic git operations without user authorization or visible hooks?.