Claude Code runs Git reset –hard origin/main against project repo every 10 mins

https://news.ycombinator.com/rss Hits: 5
Summary

Summary Claude Code performs git fetch origin + git reset --hard origin/main on the user's project repo every 10 minutes via programmatic git operations (no external git binary spawned). This silently destroys all uncommitted changes to tracked files. Untracked files survive. Git worktrees are immune. Environment Claude Code version: 2.1.87 (Homebrew cask, compiled Bun binary) OS: macOS 15.4 (Darwin 25.3.0, arm64) Shell: zsh Evidence 1. Git reflog: 95+ entries at exact 10-minute intervals e8ea2c9 HEAD@{2026-03-29 22:19:09 +0200}: reset: moving to origin/main e8ea2c9 HEAD@{2026-03-29 22:09:09 +0200}: reset: moving to origin/main e8ea2c9 HEAD@{2026-03-29 21:59:09 +0200}: reset: moving to origin/main e8ea2c9 HEAD@{2026-03-29 21:49:09 +0200}: reset: moving to origin/main ... 8792b6c HEAD@{2026-03-29 16:55:41 +0200}: reset: moving to origin/main 8792b6c HEAD@{2026-03-29 16:45:41 +0200}: reset: moving to origin/main ... 32aa7c7 HEAD@{2026-03-28 15:47:36 +0100}: reset: moving to origin/main 32aa7c7 HEAD@{2026-03-28 15:37:36 +0100}: reset: moving to origin/main The second offset is consistent within each session but varies between sessions (:08, :36, :41, :09), confirming a timer tied to session start time with a 600-second interval. 95+ entries observed across 4 sessions over ~36 hours. 2. Live reproduction Modified src/lib/api.ts (tracked file) and created .canary-test.txt (untracked file) Monitored every 15 seconds At the next 10-minute mark, api.ts silently reverted — modification gone .canary-test.txt (untracked) survived Reproduced consistently across 4 consecutive cycles 3. fswatch caught the file operations At the exact reset time, fswatch on .git/ captured: 23:59:10.349 .git/refs/remotes/origin/HEAD.lock Created IsFile Removed AttributeModified 23:59:10.352 .git/logs/HEAD IsFile Updated 23:59:10.354 .git/refs/heads/main.lock Created IsFile Removed AttributeModified This is the classic pattern for git fetch origin + git reset --hard origin/main. 4. Only the Claude C...

First seen: 2026-03-29 23:59

Last seen: 2026-03-30 04:01