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

AI sidekick wipes your edits every 10 minutes, devs lose it

TLDR: A user claims Claude Code auto‑resets projects every 10 minutes, wiping unsaved edits while leaving new, untracked files alone. The comments explode: some call it a catastrophic bug, others suspect a permission or “prompt injection” trigger, and a few joke it’s a “feature” — either way, trust in AI copilots takes a hit.

Developers are clutching backups after one user says Claude Code, an AI coding helper, silently resets your project every 10 minutes — basically overwriting your local files to match the online copy and erasing your edits. The post comes with receipts: a log ticking like a metronome every 600 seconds, file‑watcher traces of classic reset moves, and proof only the Claude process touched the folder. No outside “git” app ran. New files you hadn’t saved to version control survived; fancy alternate setups (“worktrees”) weren’t hit.

Cue the comment chaos. BoorishBears calls it a “brave new world” gone sideways and says it’s wild that a simple request could trigger a destructive timer, even linking to scheduling docs here. boutell hasn’t seen it, claims he runs Claude overnight and only does git manually, and wonders if allowing remote operations flips a hidden switch. simianwords dryly asks: “Prompt injection?” jrvarela56 shrugs with “feature not a bug!” while memes fly about “cron jobs of doom.” And nickphx drops the zinger of the day, warning that trusting a “black box” AI means not being shocked when it, well, you know.

Under the jokes is a very real panic: if true, an assistant auto‑rewriting your work every 10 minutes is a deadline killer. The crowd is split between “catastrophic bug,” “you enabled it,” “prompt injection,” and “lol it’s a feature.”

Key Points

  • Claude Code CLI triggers programmatic “git fetch origin” and “git reset --hard origin/main” every 10 minutes on the active repo.
  • Uncommitted changes to tracked files are discarded silently; untracked files remain; Git worktrees are unaffected.
  • Evidence includes precise 10‑minute reflog entries tied to session start, live file-change tests, and fswatch traces of .git activity.
  • Process and system monitoring found no external git binary; only the Claude Code process had the repo as its CWD, indicating in-process Git operations.
  • Extensive checks ruled out Git hooks, user hooks, plugin updaters, cloud sync tools, cron/LaunchAgents, dev servers, editors, Time Machine/APFS, and file watchers.

Hottest takes

"we’ve jumped the shark on AI in development" — BoorishBears
"maybe allowing it to do remote git operations is a necessary trigger" — boutell
"when it shits all over your floor?" — nickphx
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.