Most likely, the developer ran `/loop 10m ` or asked claude to create a cron task that runs every 10 minutes and refreshes & resets git.
Claude Code runs Git reset –hard origin/main against project repo every 10 mins
101–110 of 219 posts
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#102Earlier quoted context omitted.
If it reliably reproduces something undesirable with statistical significance, then it is a bug. It can be fixed with RLHF.
Yes, if something is reproducible and undesirable, it is a bug and RLHF can reduce it. I'm not disupting that. "reduce" is the keyword here. You can't eliminate them entirely. My point is that fixing one bug does not eliminate the class of bugs. Heck, it does not even fix that one bug deterministically. You only reduce its probability like you rightly said. With git commands, there is not like a system like Lean that…
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#103Let'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.
comments: "ThE tItLe iS aI cOded !!!1"
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#104Let'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.
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#105Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#106Let'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.
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#107As 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.
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#108I think this post potentially mischaracterises what may be a one off issue for a certain person as if it were a broader problem. I'm guessing some context has been corrupted?
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…
How can people be so naive as to run something like Claude anywhere other than in a strictly locked down sandbox that has no access to anything but the single git repo they are working on (and certainly no creds to push code)?
This is absolutely insane behavior that you would give Claude access to your GitHub creds. What happens when it sees a prompt injection attack somewhere and exfiltrates all of your creds or wipes out all of your repos?
I can't believe how far people have fallen for this "AI" mania. You are giving a stochastic model that is easily misdirected the keys to all of your productive work.
I can understand the appeal to a degree, that it can seem to do useful work sometimes.
But even so, you can't trust it with anything, not running it in a locked down container that has no access to anything but a Git repo which has all important history stored elsewhere seems crazy.
Shouting harder and harder at the statistical model might give you a higher probability of avoiding the bad behavior, but no guarantee; actually lock down your random text generator properly if you want to avoid it causing you problems.
And of course, given that you've seen how hard it is to get it follow these instructions properly, you are reviewing every line of output code thoroughly, right? Because you can't trust that either.
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#109Let'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.
Re: Claude Code runs Git reset –hard origin/main against project repo every 10 mins
#110Earlier 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…
Claude tends to disregard "NEVER do X" quite often, but funnily enough, if you tell it "Always ask me to confirm before going X", it never fails to ask you. And you can deny it every time