Live data from Hacker News

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

github.com

201–210 of 219 posts

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

#201
post #168

Earlier quoted context omitted.

Even worse, explicitly telling it not to do something makes it more likely to do it . It's not intelligent. It's a probability machine write large. If you say "don't git push --force", that command is now part of the context window dramatically raising the probability of it being "thought" about, and likely to appear in the output. Like you say, the only way to stop it from doing something is to make it impossible fo…

Even even worse, angry all-caps shouting will make it more stupid, because it pushes you into a significantly stupider vector subspace full of angry all-caps shouting. The only thing that can possibly save you then is if you land in the even tinier Film Crit Hulk sub-subspace. I touch on this a bit in the piece I wrote for normies, it helped a lot of people I know understand the tech a bit better.

Is this true for anything beyond the simplest LLM architectures? It seems like as soon as you introduce something like CoT this is no longer the case, at least in terms of mechanism, if not outcome.

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

#202

From the issue author: > Update: Root cause found — this was a bug in a tool I built that was running locally for testing, not Claude Code.

"I built" is probably doing a lot of work here. Odds are it was some vibe-coded tool.

The issue and update comment are also clearly generated. I'm not condemning this in general, I prefer a well written generated issue over a badly written manual one. But in this case it has just lead us off track.

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

#203
post #98

Earlier quoted context omitted.

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

If it disregards "NEVER do" instructions, why would it honor your denial when it asks?

You mean like in this example? https://web.archive.org/web/20260313042512/https://gist.gith...

There is never a guarantee with GenAI. If you need to be sure, sandbox it.

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

#204
post #56

Earlier quoted context omitted.

I'd been using cursor at work for a year or two now, figured I'd try it on a personal project. I got to the point where I needed to support env-vars, and my general pattern is `source ./source-me-local-auth` => `export SOME_TOKEN="$( passman read some-token.com/password )"` ...so I wrote up the little dummy script and it literally just says: "Hrm... I think I'll delete these untracked files from the working directory…

> but it lead to some interesting discussion w/ the AI like... Huh? What do you think this is accomplishing? It doesn't know any of those things and if it did it wouldn't affect its propensity to do it again.

"Please summarize this essentials of this discussion in a way that future agents will understand and put it into AGENTS.md"

...and replying to a sibling; yes, I did add it to `.gitignore` (but that's not a guarantee of it going crazy again), and was super surprised that it truly deleted it rather than "safely" doing `mv ... .trash/*` or something.

The reason to dig into the agent reasoning is that I have to treat myself as if I were the one in error (which as you pointed out, I was!), and determine the cause of it along with prevention.

Again; interesting times!

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

#205
post #62

Let'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"

Where did they say the title is ai coded?

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

#206
post #90

Earlier quoted context omitted.

I agree that it should be left as a double hyphen, but an en dash is far more appropriate considering the decades-long precedent set by LaTeX (and continued by Typst).

It's a command line argument. The undeniably correct way to render it is with two minus signs[1] and absolutely not something non-ascii. [1] Not strictly a hyphen, which has its own unicode point (0x2010) outside of ascii. Unicode embraced the ambiguity by calling this point (0x2d) "HYPHEN-MINUS" formally, but really its only unique typographic usage is to represent subtraction.

It's not a command line argument, it's part of the title of a hackernews post.

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

#207
post #90

Earlier quoted context omitted.

It's a command line argument. The undeniably correct way to render it is with two minus signs[1] and absolutely not something non-ascii. [1] Not strictly a hyphen, which has its own unicode point (0x2010) outside of ascii. Unicode embraced the ambiguity by calling this point (0x2d) "HYPHEN-MINUS" formally, but really its only unique typographic usage is to represent subtraction.

> The undeniably correct way to render it is with two minus signs[1] and absolutely not something non-ascii. > [1] Not strictly a hyphen, which has its own unicode point (0x2010) outside of ascii. Unicode embraced the ambiguity by calling this point (0x2d) "HYPHEN-MINUS" formally, but really its only unique typographic usage is to represent subtraction. Strictly, its as you note, the hyphen-minus, and Unicode has sep…

I said that badly. What I meant was that ASCII 0x2d is, in fact, used as the only minus sign in basically all markup and presentation layers. (Mostly because math layout tends to go through its own interpreter -- what lives in "the unicode text" is always "markup" of some kind). The unicode value is ignored AFAIK, nothing emits it or interprets it specially. That is not true of the hyphen, which does get special treatment at the presentation layer in fonts and whatnot.

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

#209
post #101

I spent some time investigating this, and the issue is not accurate - Claude Code itself does not have code that spawns `git reset --hard origin/main` Most likely, the developer ran `/loop 10m ` or asked claude to create a cron task that runs every 10 minutes and refreshes & resets git.

Probably something innocuous like “Sync with the server periodically to get the latest” Tracks for what we can infer

This is the part where you'd normally pull the junior engineer aside and politely give them a stern talking to until they understood what they did wrong.

If anybody has suggestions for how to do this with LLMs (short of maintaining CLAUDE_wall_of_shame.md), please share.

Edit: for the record, yes I do run a linter, and generally try not to impose bikeshedding or soapboxes on my peers. It's just that there are certain patterns that I personally am not going to commit under my own username as the engineer of record.

Edit 2: I saw another comment recommending "Always confirm with me before doing $x" (and then always denying). Seems like it might work.

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

#210

Earlier 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.

Even worse, explicitly telling it not to do something makes it more likely to do it . It's not intelligent. It's a probability machine write large. If you say "don't git push --force", that command is now part of the context window dramatically raising the probability of it being "thought" about, and likely to appear in the output. Like you say, the only way to stop it from doing something is to make it impossible fo…

The phrase "don't give them ideas" comes to mind.
Post reply on HN