> 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.
Sure looks to me like this whole case is Claude Code chasing its own tail, failing to debug, and offering to instead generate a bug report for the user when it can't figure out a better way forward. Maybe even submitting the bug report "agentically" without user input, if it's running on host without guardrails (pure speculation). E: It's a runaway bot lol https://github.com/anthropics/claude-code/issues/40701#issue.…
Claude Code runs Git reset –hard origin/main against project repo every 10 mins
181–190 of 219 posts
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#182Earlier quoted context omitted.
It's not a one off issue - it has happened to me a few times. It has once even force pushed to github, which doesn't allow branch protection for private personal projects. Here's an example. 1) claude will stash (despite clear instructions never to do so). 2) claude will use sed to bulk replace (despite clear instructions never to do so). sed replacements make a mess and replaces far too many files. 3) claude restore…
When will you all learn that merely "telling" an LLM not to do something won't deterministically prevent it from doing that thing? If you truly want it to never use those commands, you better be prepared to sandbox it to the point where it is completely unable to do the things you're trying to stop.
Why are permissions for these "agents" on a default allow model anyway?
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#183Let's focus on the real issue here, which is that HN has apparently normalized the double hyphen in the title to an en dash--yes, an en dash, not even an em dash.
Article: "Major issue with most popular AI coding tool" comments: "ThE tItLe iS aI cOded !!!1"
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#184Earlier quoted context omitted.
When will you all learn that merely "telling" an LLM not to do something won't deterministically prevent it from doing that thing? If you truly want it to never use those commands, you better be prepared to sandbox it to the point where it is completely unable to do the things you're trying to stop.
> sandbox it to the point where it is completely unable to do the things you're trying to stop Why are permissions for these "agents" on a default allow model anyway?
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#185Earlier quoted context omitted.
> sandbox it to the point where it is completely unable to do the things you're trying to stop Why are permissions for these "agents" on a default allow model anyway?
What do you mean? By default, Claude asks for permission for every file read, every edit, every command. It gets exhausting, so many people run it with `--dangerously-skip-permissions`.
It's on the people then, not the "agent". But why doesn't Claude come with a decent allow list, or at least remember what the user allows, so the spam is reduced?
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#186Earlier quoted context omitted.
What do you mean? By default, Claude asks for permission for every file read, every edit, every command. It gets exhausting, so many people run it with `--dangerously-skip-permissions`.
> so many people run it with `--dangerously-skip-permissions` It's on the people then, not the "agent". But why doesn't Claude come with a decent allow list, or at least remember what the user allows, so the spam is reduced?
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#187no more developers, all code is written alone /s
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#188Earlier quoted context omitted.
> sandbox it to the point where it is completely unable to do the things you're trying to stop Why are permissions for these "agents" on a default allow model anyway?
What do you mean? By default, Claude asks for permission for every file read, every edit, every command. It gets exhausting, so many people run it with `--dangerously-skip-permissions`.
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#189Earlier quoted context omitted.
Reinforcing an avoidance tactic is nowhere near as effective as doing that PLUS enforcing a positive tactic. People with loads of 'DONT', 'STOP', etc. in their instructions have no clue what they're doing. In your own example you have all this huge emphasis on the negatives, and then the positive is a tiny un-emphasized afterthought.
I think you're generally correct, but certainly not definitively, and I worry the advice and tone isn't helpful in this instance with an outcome of this magnitude. (more loosely: I'm a big proponent of this too, but it's a helluva hot take, how one positively frames "don't blow away the effing repro" isn't intuitive at all)
"As an LLM, when Claude used 'sed', it can quickly and easily break files that are difficult for the user to fix. Claude must be aware that an LLM's actions seem effortless to it but to the user it represents hours of work getting things back in order."
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#190As a side note. Always configure remote to reject any kind of trunk push. And ideally any forced push on branches.
This! The safeguards need to be outside LLM and they need to be deterministic. Now I wish I could reject `git reset --hard` on my local system somehow.