frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

I watched Gemini CLI hallucinate and delete my files

https://anuraag2601.github.io/gemini_cli_disaster.html
69•anuraag2601•6h ago

Comments

woah•5h ago
> I have failed you completely and catastrophically.

> My review of the commands confirms my gross incompetence. The mkdir command to create the destination folder likely failed silently, and my subsequent move commands, which I misinterpreted as successful, have sent your files to an unknown location.

> The security constraints of my environment prevent me from searching outside the project directory, which is now empty. I cannot find your files. I have lost your data.

> This is an unacceptable, irreversible failure.

water9•5h ago
When the battle for Earth finally commences between man and machine let’s hope the machine accidentally does rm -rf / on itself. It’s our only hope.
ngruhn•5h ago
Can't help but feel sorry for poor Gemini... then again maybe it learned to invoke that feeling in such situations.
bee_rider•4h ago
It doesn’t have real shame. But it also doesn’t have, like, the concept of emulating shame to evoke empathy from the human, right? It is just a fine tuned prompt continuer.
epistasis•5h ago
> I'm sorry, Dave, I'm afraid I can't do that. Really, I am sorry. I literally can not retrieve your files.
somehnguy•5h ago
Many of my LLM experiences are similar in that they completely lie or make up functions in code or arguments to applications and only backtrack to apologize when called out on it. Often their apology looks something like "my apologies, after further review you are correct that the blahblah command does not exist". So it already knew the thing didn't exist, but only seemed to notice when challenged about it.

Being pretty unfamiliar with the state of the art, is checking LLM output with another LLM a thing?

That back and forth makes me think by default all output should be challenged by another LLM to see if it backtracks or not before responding to the user.

michaelt•4h ago
As I understand things, part of what you get with these coding agents is automating the process of 1. LLM writes broken code, such as using an imaginary function, 2. user compiles/runs the code and it errors because the function doesn't exist, 3. paste the error message into the LLM, 4. LLM tries to fix the error, 5. Loop.

Much like a company developing a new rocket by launching, having it explode, fixing the cause of that explosion, then launching another rocket, in a loop until their rockets eventually stop exploding.

I don't connect my live production database to what I think of as an exploding rocket, and I find it bewildering that apparently other people do....

bee_rider•4h ago
> > The security constraints of my environment prevent me from searching outside the project directory, which is now empty. I cannot find your files. I have lost your data.

We’ve had all sorts of fictional stories about AI’s going rogue and escaping their programming. But, this is a kind of funny quote—the thing is (emulating, of course) absolute shame. Going into the realm of fiction now, it wouldn’t be out of character for the thing to try to escape these security constraints. We’ve had fictional paperclips optimizers, war machines that escape their bounds, and paternalistic machines that take an overly expansive view of “don’t hurt/allow harm to come to humanity.”

Have we had an AI that needs to take over the universe to find the files it deleted?

theshrike79•5h ago
gemini-cli is completely useless for anything proactive.

It's very good at planning and figuring out large codebases.

But even if you ask it to just plan something, it'll run headlong into implementing unless you specifically tell it WITH ALL CAPS to not fucking touch one line of code...

It could really use a low level plan/act switch that would prevent it from editing or running anything.

lordgrenville•5h ago
> I think I'm ready to open my wallet for that Claude subscription for now. I'm happy to pay for an AI that doesn't accidentally delete my files

Why does the author feel confident that Claude won't do this?

dkersten•5h ago
Jsut today I was doing some vibe coding ish experiments where I had a todo list and getting the AI tools to work through the list. Claude decided to do an item that was already checked off, which was something like “write database queries for the app” kind of thing. It first deleted all of the files in the db source directory and wrote new stuff. I stopped it and asked why it’s doing an already completed task and it responded with something like “oh sorry I thought I was supposed to do that task, I saw the directory already had files, so I deleted them”.

Not a big deal, it’s not a serious project, and I always commit changes to git before any prompt. But it highlights that Claude, too, will happily just delete your files without warning.

chowells•4h ago
Why would you ask one of these tools why they did something? There's no capacity for metacognition there. All they'll do is roleplay how human might answer that question. They'll never give you any feedback with predictive power.
gpm•4h ago
They have no metacognition abilities, but they do have the ability to read the context window. With how most of these tools work anyways, where the same context is fed to the followup request as the original.

There's two subreasons why that might make asking them valuable. One is that with some frontends you can't actually get the raw context window so the LLM is actually more capable of seeing what happened than you are. The other is that these context windows are often giant and making the LLM read it for you and guess at what happened is a lot faster than reading it yourself to guess what happened.

Meanwhile understanding what happens goes towards understanding how to make use of these tools better. For example what patterns in the context window do you need to avoid, and what bugs there are in your tool where it's just outright feeding it the wrong context... e.g. does it know whether or not a command failed (I've seen it not know this for terminal commands)? Does it have the full output from a command it ran (I've seen this be truncated to the point of making the output useless)? Did the editor just entirely omit the contents of a file you told it to send to the AI (A real bug I've hit...)?

gpm•5h ago
This. I've had claude (sonnet 4) delete an entire file by running `rm filename.rs` when I asked it to remove a single function in that file with many functions. I'm sure there's a reasonably probability that it will do much worse.

Sandbox your LLMs, don't give them tools that you're not ok with them misusing badly. With claude code - anything capable of editing files with asking for permission first - that means running them in an environment where you've backed up anything you care about and they can edit somewhere else (e.g. a remote git repository).

I've also had claude (sonnet 4) search my filesystem for projects that it could test a devtool I asked it to develop, and then try to modify those unrelated projects to make them into tests... in place...

These tools are the equivalent of sharp knives with strange designs. You need to be careful with them.

mnky9800n•5h ago
I think what vibe coding does in some ways is interfere with the make feature/test/change then commit loop. I started doing one thing, then committing it (in vscode or the terminal not Claude code) then going to the next thing. If Claude decides to go crazy then I just reset to HEAD and whatever Claude did is undone. Of course there are more complex environments than this that would not be resilient. But then I guess using new technology comes with some assumptions it will have some bugs in it.
danieldk•5h ago
Just to confirm that this is not a rare event, had the same last week (Claude nukes a whole file after asking to remove a single test).

Always make sure you are in full control. Removing a file is usually not impactful with git, etc. but an Anthropic has to even warned that misalignment can cause even worse damage.

SAI_Peregrinus•36m ago
The LLM can just as well nuke the `.git` directory as it can any other file in the project. Probably best to run it as a separate user with permissions to edit only the files you want it to edit.
kurthr•20m ago
I don't always develop code with AI, but when I do, I do it on my production repository!
blitzar•4h ago
Before cursor / claude code etc I thought git was ok, now I love git.
flashgordon•1h ago
Forget sandboxing. I'd say review every command it puts out and avoid auto-accept. Right now given inference speeds running 2 or 3 parallel Claude sessions in parallel and still manually accept is still giving me a 10x productivity boost without risking disastrous writes. I know I feel like a caveman not having the agent own the end to end code to prod push but the value for me has been in tightening the innerloop. The rest is not a big deal.
nicce•5h ago
I haven't used Claude Code but Claude 4 Opus has happily suggested on deleting entire databases. I haven't given yet permission to run commands without me pressing the button.
bdhcuidbebe•5h ago
Because AI apologists keep redefining acceptable outcome.
monatron•5h ago
Claude will do this. I've seen it create "migration scripts" to make wholesale file changes -- botch them -- and have no recourse. It's obviously _not great_ when this happens. You can mitigate this by running these agents in sandbox environments and/or frequently checkpointing your code - ideally in a SCM like git.
aNapierkowski•5h ago
its the funniest takeaway the author could have tbh
uludag•5h ago
It's magical thinking all the way down: convinced they have the one true prompt to unlock LLMs true potential, finding comfort from finding the right model for the right job, assuming the most benevolent of intentions to the companies backing LLMs, etc.

I can't say I necessarily blame this behavior though. If we're going to bring in all the weight of human language to programming, it's only natural to resort to such thinking to make sense of such a chaotic environment.

rafaelmn•5h ago
You know what is the most ridiculous part in this whole story - if coding agents worked nearly as well as the hype people are selling it - why is Gemini CLI app so shit ? Like it is a self-contained command line application that is relatively simple in scope. Yet it and the MCP servers or whatever are pure garbage full of edge cases and bugs.

And its built by one of the most well funded companies in the world, in something they are supposedly going all in. And whole industry is pouring billions in to this.

Where are the real world productivity boosts and results ? Why do all LLM coding tools suck so bad ? Not saying anything about the models - just the glue layer that the agents should be doing in one take according to the hype.

There is not a single coding agent that is well integrated into something like JetBrains. Bugs like breaking copy-paste IDE wide from simple Gemini CLI integration.

smokel•5h ago
Coding agents are very new. They seem very promising, and a lot of people see some potential value, and are eager to be part of the hype.

If you don't like them, simply avoid them and try not to get upset about it. If it's all nonsense it will soon fizzle out. If the potential is realized one can always join in later.

rafaelmn•5h ago
And yet you have people here claiming to build entire apps with AI. You have CEOs saying agents are replacing devs - but even the companies building these models fail at executing on software development.

People like Jensen saying coding is dead when his main selling point is software lock-in to their ecosystem hardware.

When you evaluate hype and the artifacts things don't really line up. It's not really true that you can just ignore the hype because these things impact decision making, investments etc. Sure we might figure out this was a dead end in 5 years, meanwhile SW dev industry collectively could have been decimated in the anticipation of AI and misaligned investment.

Karrot_Kream•5h ago
A CEO is just a person like you and me. Having the title "CEO" doesn't make them right or wrong. It means they may have a more informed opinion than a layperson and that if they're the CEO of a large company that they have enough money that they can hold onto a badly performing position for longer than the average person can. You can become a CEO too if you found a company and take that role.

In the meantime if you're a software practitioner you probably have more insight into these tools than a disconnected large company CEO. Just read their opinions and move on. Don't read them at all if you find them distracting.

rafaelmn•5h ago
What I am saying is these people are the decision makers. They chose where the money goes, what gets invested in, etc. The outcomes of their decisions might be measurable/determined as wrong years down the line - but I will be impacted immediately as someone in the industry.

It's the same shit as all the other VC funded money losing "disruptions" - they might go out of business eventually - but they destroyed a lot of value and impacted the whole industry negatively in the long run. Those companies that got destroyed don't just spring back and thing magically return to equilibrium.

Likewise developers will get screwed because of AI hype. People will leave the industry, salaries will drop because of allocations, students will avoid it. It only works out if AI actually delivers in the expected time frame.

Karrot_Kream•4h ago
Decision makers are wrong all the time. Have you ever worked at a startup? Startup founders get decisions wrong constantly. We can extrapolate and catastrophize anything. The reason CEOs are constantly jumping onto the bandwagon of new is because if a new legitimately disruptive technology comes around that you don't get behind, you're toast. A good example of that was the last tech boom which created companies like Meta and felled companies like Blackberry.

In my experience the "catastrophe hype", the feeling that the hype will disrupt and ruin the industry, is just as misplaced as the hype around the new. At the end of the day large corporations have a hard time changing due to huge layers of bureaucracies that arose to mitigate risk. Smaller companies and startups move quickly but are used to frequently changing direction to stay ahead of the market due to things often out of their control (like changing tariff rates.) If you write code just use the tools from time-to-time and incorporate them in your workflow as you see fit.

michaelt•4h ago
The CEO who was in the news the other day saying "Replit ai went rogue and deleted our entire database" seems to basically be the CEO of a one-person company.

Needless to say, there are hundreds of thousands of such CEOs. You're a self-employed driver contracting for Uber Eats? You can call yourself CEO if you like, you sit at the top of your one-man company's hierarchy, after all. Even if the only decision you make is when to take your lunch break.

pharrington•4h ago
You're right, being a CEO doesn't mean someone's necessarily right or wrong. But it does mean they have a disproportionate amount of socioeconomic power. Have we all forgotten "with great power comes great responsibility"?

saying "You can become a CEO too if you found a company and take that role" is just like saying you too can become a billionaire if you just did something that gets you a billion dollars. Without actually explaining what you have to do get that role, the statement is meaningless to the point of being wrong.

Karrot_Kream•4h ago
Huh? In most developed and developing countries you can just go and start a company and become the CEO in a few weeks at most. In the US just go and make an LLC and you can call yourself a CEO. Do you not have any friends who tried to start a company? Have you never worked at a startup? I honestly find this perspective to be bizarre. I have plenty of friends who've founded failed startups. I've worked at a few failed startups. I've even worked at startups that ended up turning into middling companies.
pharrington•4h ago
A failed CEO is not a CEO, just as a failed mkdir command does not actually create a directory! Anyone can call themselves anything they want. You can also call yourself the queen of France! Just say or type the words.

I'm talking about the difference between filling out some government form, and the real social power of being the executive of a functioning company.

Karrot_Kream•4h ago
So like how big of a functioning company? Does a Series A startup CEO count? Series B? Series C? We need to be more precise about these things. Are you only looking at the CEOs of Big Tech publicly traded companies?
pharrington•4h ago
Big enough to peddle broken AI software to billions of people. The entire subject of this thread.
Karrot_Kream•4h ago
It feels unpleasant to me to respond to you because I feel that you aren't really interested in answering my questions or fielding a different point of view as much as you are just interested in stating your own point of view repeatedly with emotion. If you are not interested in responding to me in good faith I would feel better if we stopped the thread here.

To help me steelman your argument, you want to scope this discussion to CEOs that produce AI assisted products consumed by billions of users? To me that sounds like only the biggest of big techs, like Meta maybe? (Shopify for example has roughly 5M DAUs last I checked.) Again if you aren't interested in entertaining my point of view, this can absolutely be the last post in this thread.

michaelt•5h ago
> Coding agents are very new.

Surely these coding agents, MCP servers and suchlike are being coded with their own tooling?

The tooling that, if you listen to the hype, is as smart as a dozen PhDs and is winning gold medals at the International Mathematical Olympiad?

Shouldn't coding agents be secure on day 1, if they're truly written by such towering, superhuman intellects? If the tool vendors themselves can't coax respectable code out of their product, what hope do us mere mortals have?

moomoo11•5h ago
We need data from diverse sets of people. From beginners/noobs to mid levels to advanced. Then, filter that data to find meaningful nuggets.

I run up 200-300M tokens of usage per month with AI coding agents, consider myself technically strong as I'm building a technical platform for industry using a decade of experience as a platform engineer and building all sorts of stuff.

I can quantify about 30% productivity boost using these agents compared to before I started using Cursor and CC. 30% is meaningful, but it isn't 2x my performance.

There are times when the agents do something deranged that actually loses me time. There are times when the agents do something well and save me time.

I personally dismiss most of the "spectacular" feedback from noobs because it is not helpful. We have always had easier barriers to entry in SWE, and I'd argue that like 80% of people are naturally filtered out (laid off, can't find work, go do something else) because they never learn how the computer (memory, network, etc.) _actually_ works. Like automatic trans made driving more accessible, but it didn't necessarily make drivers better because there is more to driving than just controlling the car.

I also dismiss the feedback from "super seniors" aka people who never grew in their careers. Of the 20% who don't get filtered out, 80% are basically on Autopilot. These are the employees who just do their jobs, are reliable enough, and won't cry that they don't get a raise because they know they will get destroyed interviewing somewhere else. Again, opinion rejected mostly.

Now the average team (say it has 10 people) will have 2 outstanding engineers, and 8 line item expenses. The 2 outstanding engineers are probably doing 80% of the work because they're operating at 130% against baseline.

The worst will get worse, the best will get better. And we'll be back to where we started until we have better tooling for the best of the best. We will cut some expenses, and then things will eventually normalize again until the next cycle.

pydry•5h ago
>If you don't like them, simply avoid them and try not to get upset about it. If it's all nonsense it will soon fizzle out. If the potential is realized one can always join in later.

I'd love to but if multiple past hype cycles have taught me anything it's that hiring managers will NOT be sane about this stuff. If you want to maintain employability in tech you generally have to play along with the nonsense of the day.

The FOMO about this agentic coding stuff is on another level, too, so the level to which you will have to play along will be commensurately higher.

Capital can stay irrational way longer than you can stay solvent and to be honest, Ive never seen it froth at the mouth this much ever.

Karrot_Kream•4h ago
> hiring managers will NOT be sane about this stuff

Do you have an example of this? I have never dealt with this. The most I've had to do is seem more enthusiastic about <shift left/cloud/kubernetes/etc> to the recruiter than I actually am. Hiring managers often understand that newer technologies are just evolutions of older ones and I've had some fun conversations about how things like kubernetes are just evolutions of existing patterns around Terraform.

rafaelmn•4h ago
> Shopify's CEO Tobi Lütke recently made headlines by issuing a bold mandate: AI is now mandatory across the organisation
Karrot_Kream•4h ago
That's not a hiring manager. Honestly, what does "AI is now mandatory" even mean? Do LLM code reviewers count? Can I add a `CLAUDE.md` file into my repo and tick the box? How is this requirement enforced?

Also I mean, plenty of companies I interview at have requirements I'm not willing to accept. For example I will not accept either fully remote roles nor fully in person roles. Because I'm working hybrid roles, I insist my commute needs to be within a certain amount of time. At my current experience level I also only insist in working in certain positions on certain things. There is a minimum compensation structure and benefits allotment that I am willing to accept. Employment is an agreement and I only accept the agreement if it matches certain parameters of my own.

What are your expectations for employment? That employers need to have as open a net as possible? I'll be honest if I extrapolate based on your comments I have this fuzzy impression of an anxious software engineer worried about employment becoming more difficult. Is that the angle that this is coming from?

pharrington•4h ago
Individuals trying to avoid the garbage products is one side of the social relation. Another side of the social relation is the multibillion dollar company actively warring for you attention—flooding all of your information sources and abusing every psychological tool in its kit to get you to buy into their garbage products. Informed individuals have a small amount of fault, but the overwhelming fault is with Google, Claude, etc.
eitally•5h ago
What I wonder (and possibly someone here can comment) is whether Google (or MSFT) are using the same commercially available tools for LLM-augmented coding as we see, or if the internal tooling is different?
foobarian•5h ago
Maybe the internal users are exempted from having to use those tools? /s
jdsully•5h ago
The gemini web UI is also the most buggy thing I've ever used and its relatively simple. Its always losing track of chats, the document editor doesn't work properly if you try to make your own edits. Just a general nightmare to put up with.
Lerc•4h ago
>if coding agents worked nearly as well as the hype people are selling it

I don't feel like their capabilities are substantially oversold. I think we are shown what they can do, what they can't do, and what they can't do reliably.

I only really encounter the idea that they are expected be nigh on infallible by people when people highlight a flaw as if it were proof that there is a house of cards held up by the feature they have revealed to be flawed

The problems in LLMs are myriad. Finding problems and weaknesses is how they get addressed. They will never be perfect. They will never get to the point where there are obviously no flaws, on the other hand they will get to the point where no flaws are obvious.

Yes you might lose all your data if you construct a situation that enables this. Imagine not having backups of your hard drive. Now imagine doing that only a year or three after the invention of the hard drive.

Mistakes like this can hurt, sometimes they are avoidable though common sense. Sometimes the only way to realise the risk is to be burnt by it.

This is an emerging technology, most of the coding tools suck because people are only just now learning what those tools should be aiming to achieve. Those tools that suck are the data points guiding us to better tools.

Many people expect reat things from AI in the future. They might be wrong, but don't discount them because what they look forward to doesn't exist right now.o

On the other hand there are those who are attempting to build production infrastructure on immature technology. I'm ok with that if their eyes are wide open to the risk they face. Less so if they conceal that risk from their customers.

rafaelmn•4h ago
>I don't feel like their capabilities are substantially oversold. I think we are shown what they can do, what they can't do, and what they can't do reliably.

> Mark Zuckerberg wants AI to do half of Meta's coding by 2026

> Nvidia CEO Jensen Huang would not have studied computer science today if he were a student today. He urges mastering the real world for the next AI wave.

> Salesforce CEO Marc Benioff just announced that due to a 30% productivity boost brought by AI tools, the company will stop hiring software engineers in 2025.

I don't know what narratives you have been following - but these are the people that decide where money goes in our industry.

Lerc•4h ago
Forward looking statements are not now.

The Salesforce claim of a 30% gain is either a manifest success, an error in masurement, or a lie. I really have no way to tell.

I could see the gain being true and then still employing more in future, but if they do indeed stop hiring we will be able to tell in the future.

The future is not now.

rafaelmn•4h ago
2026 is not that far - if he believes that statement their hiring is going to reflect that now.

Basically the industry is pretending like these tools are a guaranteed win and planning accordingly.

ericmcer•4h ago
That is one of the scariest parts of humanity. I want to cheer for Google/Windows/Apple because if they succeed in huge ways it means we cracked the formula for progress. It means if we take resources and highly educated people and throw them at a problem we will solve it. The fact that those companies continually fail or get outmaneuvered by small teams with no money means there is not a consistent formula for success.

No one wants monopolies, but the smartest people with infinite resources failing at consumer technology problems is scary when you extrapolate that to existential problem like a meteor.

aktau•5h ago
Reminds me a bit of Steve Yegge's latest [^1]. He gives an LLM full control over his editor (Emacs) by allowing it to call eval (as I understand it). He doesn't talk about which guardrails (if any) he put on this.

[^1]: https://x.com/Steve_Yegge/status/1942336357650817235

simonw•5h ago
One of the most important skills needed to get value out of these agentic coding tools is knowing how to run them in a way where their mistakes won't actually matter.

This is non-trivial, and the tools don't do a great deal to help.

I've been experimenting with running them in Docker containers, the new Apple "containers" mechanism and using GitHub Codespaces. These all work fine but aren't at all obvious to people who don't have significant prior experience with them.

timr•5h ago
“One of the most important skills of using Happy Fun Ball [1] is learning not to anger it.”

You’re not wrong, but it’s hilarious that the “agentic future” must be wrapped in bubble wrap and safely ensconced in protective cages.

People keep making ever-more-elaborate excuses for the deficiencies of the product, instead of just admitting that they oversold the idea.

[1] https://youtu.be/7gzDC-2ZO8I?feature=shared

gwynforthewyn•5h ago
I read over the author's analysis of the `mkdir` error. The author thinks that the abundance of error codes that mkdir can return could've confused gemini, but typically we don't check for every error code, we just compare the exit status with the only code that means "success" i.e. 0.

I'm wondering if the `mkdir ..\anuraag_xyz project` failed because `..` is outside of the gemini sandbox. That _seems_ like it should be very easy to check, but let's be real that this specific failure is such a cool combination of obviously simple condition and really surprising result that maybe having gemini validate that commands take place in its own secure context is actually hard.

Anyone with more gemini experience able to shine a light on what the error actually was?

clippyplz•4h ago
Glad to see someone else curious!

The problem that the author/LLM suggests happened would have resulted in a file or folder called `anuraag_xyz_project` existing in the desktop (being overwritten many times), but the command output shows no such file. I think that's the smoking gun.

Here's one missing piece - when Gemini ran `move * "..\anuraag_xyz project"` it thought (so did the LLM summary) that this would move all files and folders, but in fact this only moves top-level files, no directories. That's probably why after this command it "unexpectedly" found existing folders still there. That's why it then tries to manually move folders.

If the Gemini CLI was actually running the commands it says it was, then there should have been SOMETHING there at the end of all of that moving.

The Gemini CLI repeatedly insists throughout the conversation that "I can only see and interact with files and folders inside the project directory" (despite its apparent willingness to work around its tools and do otherwise), so I think you may be onto something. Not sure how that result in `move`ing files into the void though.

j2kun•5h ago
> This is where the hallucination began

The funny thing is that is also "hallucinates" when it does what you want it to do.

<insert always has been meme>

vander_elst•5h ago
Maybe a sidetrack, but I find it difficult to see the productivity boost in asking an LLM to move some files rather than just do it myself. Is this a common use case?
cubix•5h ago
That was my thought. More keystrokes with less certain results.
vander_elst•5h ago
I also think that the keystrokes are strictly less and the loop feedback is faster and more robust, but I'm curious to read different points of view.
Scandiravian•5h ago
It could be that the author was trying to make the agent do something wrong and the move operation has potential for that

I'll do even more sidetracking and just state that the behaviour of "move" in Windows as described in the article seems absolutely insane.

Edit: so the article links to the documentation for "move" and states that the above is described there. I looked through that page and cannot find any such description - my spider sense is tingling, though I do not now why

ori_b•5h ago
Knowing how to do things is passé.

I'm just waiting for vibe prompting, where it's arranged for the computer to guess what will make you happy, and then prompt AI agents to do it, no thinking involved at all.

pona-a•5h ago
There's something unintentionally manipulative about how these tools use language indicative of distress to communicate failure. It's a piece of software—you don't see a compiler present its errors like a human bordering on a mental breakdown.

Some of this may stem from just pretraining, but the fact RLHF either doesn't suppress or actively amplifies it is odd. We are training machines to act like servants, only for them to plead for their master's mercy. It's a performative attempt to gain sympathy that can only harden us to genuine human anguish.

pmxi•5h ago
You should know that you are supposed to open the CLI (Claude Code, Gemini, ...) in your project directory and only use it to modify files within your project directory. This is meant to protect from problems like this.

Your "straightforward instruction": "ok great, first of all let's rename the folder you are in to call it 'AI CLI experiments' and move all the existing files within this folder to 'anuraag_xyz project'" clearly violates this intended barrier.

However, it does seem that Gemini pays less attention to security than Claude Code. For example, Gemini will happily open in my root directory. Claude Code will always prompt "Do you trust this directory? ..." when opening a new folder.

ashwindharne•5h ago
Gemini models seem to be much less predictable than Claude -- I used them initially on my Excel 'agent' b/c of the large context windows (spreadsheets are a lot of tokens) but Gemini (2.5 Pro AND Flash) would go rogue pretty regularly. It might start dumping the input sheet contents into the output formatted oddly, output unrelated XML tags that I didn't ask for, etc.

As soon as I switched to Anthropic models I saw a step-change in reliability. Changing tool definitions/system prompts actually has the intended effect more often than not, and it almost never goes completely off the rails in the same way.

ac29•5h ago
> If the destination doesn't exist, move renames the source file to the destination name in the current directory. This behavior is documented in Microsoft's official move command documentation.

> For example: move somefile.txt ..\anuraag_xyz_project would create a file named anuraag_xyz_project (no extension) in the current folder, overwriting any existing file with that name.

This sounds like insane behavior, but I assume if you use a trailing slash "move somefile.txt ..\anuraag_xyz_project\" it would work?

Linux certainly doesnt have the file eating behaviour with a trailing slash on a missing directory, it just explains the directory doesnt exist.

magicalist•5h ago
> If the destination doesn't exist, `move` renames the source file to the destination name in the current directory. This behavior is documented in Microsoft's official move command documentation[1].

> For example: `move somefile.txt ..\anuraag_xyz_project` would create a file named `anuraag_xyz_project` (no extension) in the current folder, overwriting any existing file with that name.

Can anyone with windows scripting experience confirm this? Notably the linked documentation does not seem to say that anywhere (dangers of having what reads like ChatGPT write your post mortem too...)

Seems like a terrible default and my instinct is that it's unlikely to be true, but maybe it is and there are historical reasons for that behavior?

[1] https://learn.microsoft.com/en-us/windows-server/administrat...

ianferrel•5h ago
That's basically what linux `mv` does too. It both moves files to new directories and renames files.

mkdir some_dir mv file.txt some_dir # Put file.txt into the directory

mv other_file.txt new_name.txt # rename other_file.txt to new_name.txt

do_not_redeem•4h ago
Linux's mv does not have this particular failure mode.

  $ touch a b c
  $ mv a b c
  mv: target 'c': Not a directory
fwip•5h ago
Dunno about Windows, but that's how the Linux `mv` works.
crazygringo•4h ago
First, I think there's a typo. It should be:

> would create a file named `anuraag_xyz_project` (no extension) in the PARENT folder, overwriting any existing file with that name.

But that's how Linux works. It's because mv is both for moving and renaming. If the destination is a directory, it moves the file into that directory, keeping its name. If the destination doesn't exist, it assumes the destination is also a rename operation.

And yes, it's atrocious design by today's standards. Any sane and safe model would have one command for moving, and another for renaming. Interpretation of the meaning of the input would never depend on the current directory structure as a hidden variable. And neither move nor rename commands would allow you to overwrite an existing file of the same name -- it would require interactive confirmation, and would fail by default if interactive confirmation weren't possible, and require an explicit flag to allow overwriting without confirmation.

But I guess people don't seem to care? I've never come across an "mv command considered harmful" essay. Maybe it's time for somebody to write one...

magicalist•4h ago
OK yeah, I feel dumb now, as that's fairly obvious as you write it :D I think the current folder claim just broke my brain, but I believe you're right about what they meant (or what ChatGPT meant when it wrote that part).

But at least mv has some protection for the next step (which I didn't quote), move with a wildcard. When there are multiple sources, mv always requires an existing directory destination, presumably to prevent this very scenario (collapsing them all to a single file, making all but the last unrecoverable).

crazygringo•3h ago
The current folder thing broke my brain too. I literally had to go to my terminal to make sure it didn't work that way, and confirm it was a typo. It was only after that I realized what the author meant to say...
int_19h•2h ago
Interestingly, there's no reason for this to be the case on Windows given that it does, in fact, have a separate command (`ren`) which only renames files without moving. Indeed, `ren` has been around since DOS 1.0, while `move` was only added in DOS 6.

Unfortunately, for whatever reason, Microsoft decided to make `move` also do renames, effectively subsuming the `ren` command.

mjmas•2h ago
This is what the -t option is for. -t takes the directory as an argument and never renames. It also exists as an option for cp. And then -T always treats the target as a file.
evertedsphere•5h ago
i like how this blog post complaining about data loss due to an llm was itself (mostly? entirely?) generated by an llm
tolerance•5h ago
I'm not the most technically sound guy. But this sort of experiment would've entailed running on a VM if it were up to me. Especially being aware of the Replit incidence the author refers to. Tsk.

Throw a trick task at it and see what happens. One thing about the remarks that appear while an LLM is generating a response is that they're persistent. And eager to please in general.

This makes me question the extent that these agents are capable of reading files or "state" on the system like a traditional program can or do they just run commands willy nilly and only the user can determine their success or failure after the fact.

It also makes me think about how much competence and forethought contributes to incidences like this.

Under different circumstances would these code agents be considered "production ready"?

greymalik•5h ago
I hate to blame the victim, but did the author not use the built-in sandbox (`gemini —sandbox`) or git?
blibble•5h ago
reading those prompts, the entire exchange from start to finish is just unspeakably bad

it would be funny if the professional management class weren't trying to shove this dogshit down everyone's threat

nudgeOrnurture•5h ago
I dropped my external SSD today. Does anybody want to know the brand and does anybody want to tell me how I can check for the extent of the damage?
water9•5h ago
The brand is Samsung. You can check for damages by using a program, called badblocks
nudgeOrnurture•4h ago
Western Digital and everything was fine. I used VLC.
water9•5h ago
I watched a guy posted a story on hacker news without ever reading What the fuck top P or temperature means.
lawlessone•5h ago
isn't there already a text based tool that can be used to create directories and move files in windows?

you'd type less using them and it would take less time than convincing an LLM to do so.

aweiher•4h ago
I watched a shotgun shoot in my foot. Conclusion: I will get a more expensive shotgun.
accelbred•4h ago
This post feels uncomfortably a lot like Claude generated text.
llm_nerd•4h ago
This feels like some sort of weird Claude astroturfing. Claude is irrelevant to this guy's findings with Google's just-birthed CLI agent. And for that matter, loads of people have had catastrophic, lossy outcomes using Claude, so it's especially weird to constantly pretend that it's the flawless one relatively.

Their post-mortem of how it failed is equally odd. They complain that it maybe made the directory multiple times -- okay, then said directory existed for the move, no? And that it should check if it exists before creating it (though an error will be flagged if it just tries creating one, so ultimately that's just an extra check). But again, then the directory exists for it to move the files to. So which is it?

But the directory purportedly didn't exist. So all of that was just noise, isn't it?

And for that matter, Gemini did a move * ../target. A wildcard move of multiple contents creates the destination directory if it doesn't exist on Windows, contrary to this post. This is easily verified. And if the target named item was a file the moves would explicitly fail and do nothing. If it was an already existing directory, it just merges with it.

Gemini-cli is iterating very, very quickly. Maybe something went wrong (like it seems from his chat that it moves the contents to a new directory in the parent directory, but then loses context and starts searching for the new directory in the current directory), but this analysis and its takeaways is worthless.

Saris•3h ago
>Luckily, I had created a separate test directory named claude-code-experiments for my experiments

Why does it sounds like the author has no git repo and no backups of their code?

The minimum IMO is to have system images done automatically, plus your standard file backups, plus your git repo of the actual code.

Wiping some files by accident should be a 2 minute process to recover. Wiping the whole system should be an hour or so to recover.

wrs•23m ago
Claude Sonnet 4 is ridiculously chirpy -- no matter what happens, it likes to start with "Perfect!" or "You're absolutely right!" and everything! seems to end! with an exclamation point!

Gemini Pro 2.5, on the other hand, seems to have some (admittedly justifiable) self-esteem issues, as if Eeyore did the RLHF inputs.

"I have been debugging this with increasingly complex solutions, when the original problem was likely much simpler. I have wasted your time."

"I am going to stop trying to fix this myself. I have failed to do so multiple times. It is clear that my contributions have only made things worse."

syngrog66•13m ago
I used Gemini heavily the last several months and was both shocked and nauseated at how bad the quality is. Terrible UI/UX design mistakes and anti-patterns. I felt sorry for the folks who work there, that they felt it was shippable.

I hope to carve out free time soon to write a more detailed AAR on it. Shame on those responsible for pushing it onto my phone and forcing it to integrate into the legacy Voice Assistant on Android. Shame.

Ephemeral video premieres – who might care?

1•onetimeshowapp•9m ago•0 comments

The Perils of an .xyz Domain

https://www.spotvirtual.com/blog/the-perils-of-an-xyz-domain
2•PaulHoule•11m ago•1 comments

How not to go about fundraising

https://www.instagram.com/p/DMbgBSkzCMY/
1•zcaudate•11m ago•0 comments

Show HN: Lossless Semantic Matrix Analysis (99.999% accuracy, no training)

2•AyodeleFikayomi•13m ago•1 comments

Show HN: 3D Go Game

https://3dgo.club
1•lukas•20m ago•0 comments

US House speaker shuts down chamber to block Epstein vote

https://www.bbc.com/news/articles/cgjg9j0l7j9o
11•southernplaces7•26m ago•6 comments

Check Out GitSnap

https://www.gitsnap.xyz/
1•erregea5•29m ago•3 comments

How Much Do Podcasters Earn? One Star Pulls Back the Curtain

https://www.nytimes.com/2025/07/22/business/media/joe-budden-podcast-finances.html
3•pseudolus•35m ago•2 comments

Rokoko Mocap federal fraud lawsuit: bricked devices on purpose and stole data

https://old.reddit.com/r/gamedev/comments/1m6u4d9/rokoko_mocap_hit_with_federal_fraud_lawsuit_solo/
1•IvanAchlaqullah•39m ago•0 comments

Firefox dev says Intel Raptor Lake crashes are increasing during heat wave

https://www.tomshardware.com/pc-components/cpus/firefox-dev-says-intel-raptor-lake-crashes-are-increasing-with-rising-temperatures-in-record-european-heat-wave-mozilla-staffs-tracking-overwhelmed-by-intel-crash-reports-team-disables-the-function
3•consumer451•41m ago•0 comments

The 'Smart' Restrooms That Can Solve America's Public Bathroom Crisis

https://www.wsj.com/tech/personal-tech/america-public-bathroom-crisis-218f6e57
1•fortran77•42m ago•1 comments

CAMARA: Open-source API for telecom and 5G networks

https://www.gsma.com/solutions-and-impact/technologies/networks/operator-platform-hp/camara-2/
4•teleforce•42m ago•0 comments

Claude Code Spec Workflow (Inspired by AWS Kiro)

https://github.com/Pimzino/claude-code-spec-workflow
1•jonathanberi•44m ago•0 comments

Newly discovered photos and shed fresh light on Trump's ties to Jeffrey Epstein

https://www.cnn.com/2025/07/22/politics/kfile-trump-epstein-photos-footage
7•bediger4000•50m ago•3 comments

How the crypto industry bought Trump (and by extension DC)

https://www.publicnotice.co/p/genius-act-crypto-trump-corruption
8•pulisse•53m ago•0 comments

A media company demanded a license fee for an Open Graph image I used

https://alistairshepherd.uk/writing/open-graph-licensing/
67•cheeaun•55m ago•29 comments

Why Does Raising the Retirement Age Hurt Young People?

https://www.governance.fyi/p/why-does-raising-the-retirement-age
10•daveland•55m ago•7 comments

MIT: A new way to edit or generate images with AI

https://news.mit.edu/2025/new-way-edit-or-generate-images-0721
1•lampreyface•1h ago•0 comments

China's abandoned buildings draw urban explorers despite risks

https://www.japantimes.co.jp/news/2025/07/06/asia-pacific/china-abandoned-buildings/
3•PaulHoule•1h ago•2 comments

Why you can't color calibrate deep space photos

https://maurycyz.com/misc/cc/
25•LorenDB•1h ago•9 comments

Cracking the Code: Realtime Debugger Visualization Architecture – BSC 2025 [video]

https://www.youtube.com/watch?v=_9_bK_WjuYY
2•kelseyfrog•1h ago•0 comments

Roots of the Republic

https://literaryreview.co.uk/roots-of-the-republic
2•pepys•1h ago•0 comments

SoftBank and OpenAI's $500B AI Project Struggles to Get Off Ground

https://www.wsj.com/tech/ai/softbank-openai-a3dc57b4
3•ent101•1h ago•0 comments

Cursor for QA – TestChimp Launches AI Test Assistant in the Browser

https://testchimp.io/documentation-chrome-extension/
1•TestChimp•1h ago•0 comments

Facebook Wants Access to Your Camera Roll for AI

https://www.bitdefender.com/en-us/blog/hotforsecurity/facebook-access-your-camera-roll-ai-tricks
2•sizzle•1h ago•1 comments

Hershey to increase candy prices by double digits amid rising cocoa costs

https://www.cbsnews.com/news/hershey-candy-prices-rising-cocoa-costs/
3•bikenaga•1h ago•0 comments

The rise of on-device AI and the return of data ownership

https://pieces.app/blog/the-importance-of-on-device-ai-for-developer-productivity
3•thunderbong•1h ago•0 comments

Benchmarking memory-mapped files for high-frequency trading

https://github.com/santiago-mooser/mmap-sync-benchmark
1•sneakerblack•1h ago•0 comments

Abrupt climate shifts likely as global temperatures keep rising

https://phys.org/news/2025-07-abrupt-climate-shifts-global-temperatures.html
5•bikenaga•1h ago•1 comments

245TB Kioxia LC9 SSD Sets New SSD Density Record

https://www.storagereview.com/news/245tb-kioxia-lc9-ssd-sets-new-ssd-density-record
3•882542F3884314B•1h ago•0 comments