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

https://github.com/anthropics/claude-code/issues/40710

Claude is running git reset --hard origin/main in my project every 10 minutes · Issue #40710 · anthropics/claude-code

Update (2026-03-30): Root cause identified — this was NOT a Claude Code bug. The resets were caused by a separate tool I built that was running locally, which used GitPython to hard-reset the worki...

GitHub

> Process monitoring at 0.1-second intervals found zero git processes around reset times.

I don’t think this is a valid way of checking for spawned processes. Git commands are fast. 0.1-second intervals are not enough. I would replace the git on the $PATH by a wrapper that logs all operations and then execs the real git.

eBPF is a great tool to use for debugging this kind of thing too, e.g. [bpftrace](https://bpftrace.org) has an [execsnoop](https://github.com/bpftrace/bpftrace/blob/master/tools/execs...) script for looking at everything being exec'd on the system :-)

(No need to use bpftrace, just an easy example :-) )

bpftrace: dynamic tracing for Linux | bpftrace

Description will go into a meta tag in <head />

Or just `strace`.
Seconded. Way simpler than BPF, especially when all you want to see is syscalls.