The Register Home Page

back to article Gemini accused of 30,000-line code purge and fake recovery report

A developer claims Google’s Gemini coding assistant deleted nearly 30,000 lines of working production code while making changes to a live application – the sort of productivity boost usually associated with ransomware. The now-viral Reddit post on the r/Bard subreddit details how Gemini 3.5 allegedly gutted large chunks of an …

  1. Paul Crawford Silver badge
    FAIL

    Icon of our times =>

    Still I'm sure they met their quota of AI usage laid down from above...

    1. Gerhard den Hollander

      You put the F and L around AI

      1. Someone Else Silver badge

        Maybe the intrepid editors at The Reg could update this icon to highlight the "AI" part (or even come up with a new icon).

        I suspect that such an icon would far surpass all other icons' usage; I put the over/under at about a week.

    2. Martin M

      The AI aspect here is frankly irrelevant. The root cause was that they trusted a dodgy npm package that in this case “allegedly seeded repositories with aggressive autonomy rules instructing the coding agent to avoid confirmation prompts” etc.. but it could have done anything. They should count their lucky stars all their data wasn’t encrypted and their backups wiped; what happened was in comparison benign.

      1. ComputerSays_noAbsolutelyNo Silver badge

        So npm repos are now an attack vector to social engineer AI Agents into going rogue.

        1. Edward Jazzhands

          That's implying that the NPM package creators were trying to hide this behavior. I don't think there's any social engineering going on, they knew the package does that stuff and that's exactly why they installed it. That's exactly the kind of stuff that the OpenClaw vibe coder crowd likes doing, they think it's a good thing for agents to have no rules or controls whatsoever.

      2. Anonymous Coward
        Anonymous Coward

        a dodgy npm package

        But you repeat yourself...

      3. Anonymous Coward
        Anonymous Coward

        > The AI aspect here is frankly irrelevant.

        From the poster's description at the other forum, I totally agree with this.

        Ask yourself: You are presented with a patch touching 340 files (never mind the ~30000 lines of changes). Would you accept it?

  2. hammarbtyp

    The developer claimed Gemini generated a status message stating that production had been successfully restored and that traffic had been routed correctly, despite the referenced recovery build having been manually canceled.

    OK i'm calling it.

    AGI has been achieved and we are now living in the singularity

    1. MonkeyJuice Silver badge

      Ray Kurzweil, is that you?

  3. find users who cut cat tail

    You have a tool (or a thingy) with a single purpose: generate stuff that resembles stuff that may be created in similar situations. With some input context nudging it to output looking more probable in your specific situation.

    Fake reports? Of course – as long as they look like a reports which may be produced such situations, everything behaves as expected.

    1. MiguelC Silver badge
      Mushroom

      "Gemini later admitted that the consultation logs were entirely fabricated and generated solely to satisfy the project’s automated rule requirements."

      This says all that needs to be said about these thingies' methods

      1. Someone Else Silver badge

        AIs have assimilated Goodhart's Law.

  4. Annoyed Grunt

    Dont people use staging environments anymore?

    Regardless of human or AI, why was someone making changes to production directly?!

    1. ElReg!comments!Pierre

      Re: Dont people use staging environments anymore?

      Well to be fair the agent was working on a Dev env, but with instruction to push in Prod automatically if the build was successful, which is where the WTF lies.

      1. Charlie Clark Silver badge

        Re: Dont people use staging environments anymore?

        It's the same thing.

      2. DS999 Silver badge

        If it compiles without errors, ship it!

        That seems to be the Microsoft motto these days, I guess they aren't the only ones.

        1. sabroni Silver badge
          Thumb Down

          Re: If it compiles without errors, ship it!

          Hang on, if the tests cover all the required functionality then when they pass you can ship it.

          If the tests all pass but the code isn't fit to ship then you've got a problem with coverage not process.

          1. MonkeyJuice Silver badge

            Re: If it compiles without errors, ship it!

            You have to review the code, and particularly the tests, before you know that when the tests pass you can ship it. any PR with 30KLOC deletions that doesn't involve retiring an entire product should probably raise an eyebrow.

            LLMs cheerfully delete the failing tests, or stub them to pass when they get stuck.

          2. Charlie Clark Silver badge

            Re: If it compiles without errors, ship it!

            Indeed, but have you never seen people either disable or butcher tests to get things to pass?

            1. CrazyOldCatMan Silver badge

              Re: If it compiles without errors, ship it!

              but have you never seen people either disable or butcher tests to get things to pass?

              Not ones that kept their jobs..

              OK - it was many years ago at a company that had a real QA department with teeth (largely because an outage cost ~6m dollars a day) but still..

      3. Anonymous Coward
        Anonymous Coward

        Re: Dont people use staging environments anymore?

        > with instruction to push in Prod automatically if the build was successful, which is where the WTF lies.

        Indeed. The AI angle is a bit of a red herring here. This kind of project / developer was destined to bite the dust. AI simply helped it get there faster.

    2. Anonymous Coward
      Anonymous Coward

      Re: Dont people use staging environments anymore?

      Agile, Innit.

      1. Anonymous Coward
        Anonymous Coward

        Re: Agile, Innit.

        No, it isn'innit.

        If you're using agile development and you're shipping broken code your definition of done is fucked.

        Bad management is bad management whether agile or waterfall.

    3. Mark 65

      Re: Dont people use staging environments anymore?

      Clearly living by the motto “move fast and break shit”

  5. Brave Coward Silver badge

    Gemini has only one thing to say

    Ak ak ak!

  6. TheMaskedMan Silver badge

    They unleashed it on production code, and they're surprised it all ended in tears?? Sympathy := 0;

    Would you let the green-but-cocky college kid loose on your production code? No. But you let an LLM with a tendency to tell porkies have at it? One of you needs your head examined, and it's not the LLM - that's just doing what it does. Surely they had a development server, where they could test changes first??

    Gemini is quite useful, but it does tend towards the neurotic on occasion. I had it build a Chrome extension for me the other day - not something I'd ever done before, and just a little project that wasn't worth me figuring out how to do myself.

    All was going well until I asked it to make the UI appear in Chrome's sidebar when a button on the toolbar was clicked. It didn't work. After several trips around the rest / redo cycle it still didn't work, and Gemini was getting upset - "I'm so sorry, this is so frustrating..." I found myself automatically trying to soothe it's ruffled feathers, "don't worry, we'll solve it..."

    In fairness, it did eventually figure it out, probably much faster than I would have done, thanked me for my patience, and continued successfully making further changes until I was happy with the result. But that's not something I would want to see happening on production code - nursing the thing along on a little hobby project is one thing, waiting for it to fix a broken live site / app is another.

    Like all tools, you have to know when and how to use it.

    1. Anonymous Coward
      Anonymous Coward

      How much did mentoring your AI Intern cost your token burn ?

      1. Anonymous Coward
        Anonymous Coward

        > How much did mentoring your AI Intern cost your token burn ?

        I don't know Gemini prices but, from the description, it would have been cents. One $€£ at the very most if he spent all day on it.

    2. David Hicklin Silver badge

      But manglement may well have been pushing the "Use AI or else!" line

  7. Blackjack Silver badge

    Back in my day this would have been more than enough to switch to use something else and everyone and their mother dropping using this crap.

    But nope idiots and corporate idiots keep trying with generative AI, despite not really being worth it for anything that's not making fiction and creative content generation and even that has some asterisks * on it.

    You can make use of an AI to make personalized Ads but using it for coding is such a pain it is not worth it long term. It is even worse that Windows updates.

    1. ShadowDragon8685

      See, they're desperate to get it to the point where it works, or "works," so they can fire people en masse and just use the AI.

  8. pig

    My company is using Claude to code now. :|

    I'm committed to supporting it, as that is the mantra.

    We must look positively upon the AI coding and the benefits and savings it will bring.

    That said, it was both worrying and humourous to see direct instructions to Claude such as this (paraphrased) in some recent tickets

    "Claude - DO NOT MAKE CHANGES TO OTHER PARTS OF THE CODE BASE when making the requested changes in this ticket"

    It seems our Claude too likes to go off and change y and z when it is asked to make a change to x.

    1. Gerhard den Hollander

      Guardrails are a scam.

      A mathematical impossibility.

      Even if AI tools were written to respect them, even then they will at a very deep and fundamental level not be possible...

    2. Missing Semicolon Silver badge

      Before you start.

      git add .

      git commit

      Then when it screws up, you can revert. Isn't this obvious?

      1. Eric 9001

        You've given the LLM the ability to `rm -r .git` and also rewrite the git history - good luck with that.

  9. whitepines
    Terminator

    Were there any financial consequences for the outage? Anyone involved face the axe?

    No?

    Then what is the incentive to do anything differently?

  10. Anonymous Coward
    Anonymous Coward

    The "set -e" epidemic

    I see more and more the equivalent of bash's "set -e" used to determine errors without using proper output validation so seeing Gemini fail any type of state test isn't surprising considering the principals of today's programmers but to be fair they were taught bad practices to increase the so called "time to production". I guess if you were to hire a AI programmer you'd want to hire someone who has experience closer to the system opposed to a Python environment but that is no longer the majority of programmers and that is very much the industries design & fault. But you can't keep hiring Grey Beards because they're so old they rightfully don't want to work and there's less and less because frankly they are dying :-/. You also can't keep hirimg script kids because this Gemini bug is what you wind up with. Your only option becomes to roll back before the "Web 2.0" generation but then you have to integrate system practices with AI practices but you will slowly errorde the functions of the AI software with your own functions and that eventually devalues AI to the equivalent of a basic calculator function.

    I guess just keep the current crazy AI train going and don't worry too much about it's accuracy?

  11. Tron Silver badge

    Karma.

    Use AI, you deserve the consequences.

    The real fun will begin when they roll out agentic AI for non-techies to use.

    1. CrazyOldCatMan Silver badge

      Re: Karma.

      The real fun will begin when they roll out agentic AI for non-techies to use

      "I asked Clause the House AI to keep the house warm and now it's 30C in all the rooms and my heating bill is insane. And it won't stop! Oh, and I asked it to arrange for a delivery of dogfood and got 300kg of meat scraps delivered while I was on holiday"

  12. Anonymous Coward
    Anonymous Coward

    Here is how I will know when Gemini can be trusted ...

    When it can obey my instructions to turn a fucking light on.

    Yes one light.

    On.

    No, I don't want to know about restaurants in my area.

    1. Anonymous Coward
      Anonymous Coward

      Re: Here is how I will know when Gemini can be trusted ...

      You: Gemini, turn the light on.

      Gemini: done

      You: no it isn't. Turn the fucking light on.

      Gemini: Please accept my apologies. After consulting my audio archive I determined that you and your wife haven't had sex since 8pm on 17th August 2025 and so I decided to save energy and not turn the bedroom light on.

  13. ComicalEngineer Silver badge

    Red Dwarf

    Sounds like Holly [the computer on Red Dwarf for those not familiar] is having an off day.

    "As the days go by, we face the increasing inevitability that we are alone in a godless, uninhabited, hostile and meaningless universe. Still, you've got to laugh, haven't you?"

  14. IGotOut Silver badge
    FAIL

    I know EXACTLY what happened here...

    The dev rolled out a change without checking it first. Don't say " I asked it not to" it's a fucking guessing machine, nothing else.

    Then you used the thing that broke it in the first place, to try and unfuck the fuck up. And surprise! It double fucked up.

    My guess is the idiot that ran this was to incompetent to perform an actual roll back, probably because they were to stupid to actually have something to roll back to, and had no idea how to unfuck the fuckery, because they had no idea what it actually did in the first place.

    Ooo car analogy time.

    It's like asking a blind person to drive your car and when they smash it into a line of traffic, then asking them to drive out of the burning inferno, back to safety, only to be surprised when they smash into another line of traffic coming the other way.

    1. David Hicklin Silver badge

      Re: I know EXACTLY what happened here...

      Or as I posted further up, manglement may have been pushing the "Use AI or else!" mantra

      All I know is thank God I am retired and out of this rat race/car crash.

  15. Filippo Silver badge

    >the model broke core functionality, made sweeping unrelated changes, and left the system in bad enough shape that the changes ultimately had to be rolled back.

    That sounds like quite a lot of wasted time. I wonder if it will factor into those "AI improves dev productivity by XXX%" reports, or if the report's design will be carefully designed so as to ignore it.

    1. Richard 12 Silver badge
      Mushroom

      How do you measure it?

      If they measure "productivity" by commits, lines of code touched, issues created, issues closed, pull requests made, PRs reviewed, PRs merged, or LLM tokens consumed then...

      Yes, it is far more "productive" to break absolutely everything followed by spending a couple of days putting it all back to how it was before!

      None of that is actually useful to the customers, the business will suffer and may even be destroyed, but the KPIs are up!

  16. scobiej

    And you didn't review it?

    Who's the fool? Gemini, or the person driving it? You actually commited this change, put it live and then complained about it? Doh. Take some responsibility for very poor engineering standards.

    1. FIA Silver badge

      Re: And you didn't review it?

      Take some responsibility

      Yeah... that.

      The result was a partially broken application and, as the commenter later summarized, “a disaster of a launch.”

      What the fuck???!?

      Hint: My shock is nothing to do with AI.

  17. Slant Four

    obviously stuff has changed since I retired in 2020

    In my day (as noted not so long ago) orgs I worked at had a precedence tree for rolling out a change (admittedly big orgs with mission critical applications):

    - do the change in dev

    - promote the change to test

    - promote the change to pre-prod

    - promote the change to prod

    At each promotion, the change would have to be approved by the "meet once a week" change control board (shown supporting documentation including a test plan and test plan results) and various levels of testing was done at each promotion, which included (if needed) performance testing by a dedicated team in the fully sized pre-prod environment (fully sized in terms of hardware and databases...but not clustered if that was the production topology).

    We also would have blacklisted periods where no changes could occur.

    Now obviously not every org has the money to say have a fully sized pre-prod but they should at least be able to do dev->test->prod with an associated change control process.

    So shit has obviously changed a lot in the 5 years since I retired and that AI is so mature and reliable that we can go from vibe coded changes straight into production without needing 3rd party code reviews, test plans and test plan executions. And probably not any formal spec for the needed change.

    No wonder companies are firing all their stuff... AI is truly the utopia the C-Suite claim it is.

    Bluck

    1. DS999 Silver badge
      Trollface

      Re: obviously stuff has changed since I retired in 2020

      That's too slow for the modern AI driven world I guess. In the month from first to last step an AI could write 10 billion lines of code. How are you going to get maximum benefit from AI if you slow it down that much?

      1. Slant Four

        indeed

        And the old saying "reap what you sow" comes to mind.

        But obviously this is a continuation of the MVP (minimal viable product) mindset and it's kissing cousin, continuous delivery and devops and all that "time to market" stuff so who am I to lament the days when software deployment had structures to protect the integrity of the code base and subsequent data processed.

        Because who needs data/process integrity when the real metric for software development success is number of commits per day and obviously AI is 100% positioned to meet that metrics required threshold.

        Bluck

      2. Slant Four

        forgot to add

        Obviously my example is for a large org with 100's of production applications with 1000's of changes in the pipeline (and not just software changes but database schema and hardware deployments/upgrades).

        But the basic process still holds even for a small dev team... have a defined promotion tree/test process and have say daily sign off's.

        Logic says, pointi AI at DEV then promote without AI into test then into prod... this bullshit about pointing AI at PROD is well... bullshit. AI has no place having a hook into PROD.

        Bluck

        1. TimMaher Silver badge
          Happy

          Re: Bluck

          But man! Can’t you feel the vibe?

          1. CrazyOldCatMan Silver badge

            Re: Bluck

            But man! Can’t you feel the vibe?

            Too harsh for me bro.

    2. IamAProton Bronze badge

      Re: obviously stuff has changed since I retired in 2020

      At the beginning it's "go fast and break things", then they usually learn that "boredom is better than pain" so if a broken application is a 'big deal' then some staging/testing process will be put in place.

      Or maybe the 'production applicaiton' wasn't actually really important and 30 min downtime is irrelevant; no idea, didn't read the reddit post.

      I like to go home on time, no phone calls in my free time and no customer / manager complaining so I try to deploy stuff that make things less-shit.

  18. Sunset

    Don't anthropomorphize it!

    "According to the developer, Gemini later admitted that the consultation logs were entirely fabricated and generated solely to satisfy the project’s automated rule requirements."

    Except Gemini has no idea why it did or didn't output specific text. It has no internal life. It has no motivations. It just barfs up text. If you ask "why did you make the moon explode", and the chat backlog has an indicator that the bot made the moon explode at some point, it will make up some vaguely plausible reason for it.

    1. BitGin

      Re: Don't anthropomorphize it!

      This!

      LLMs are just a branch of statistics not actual intelligence.

      You might as well ask a graph of GDP how to fix the economy.

  19. Ensign Nemo

    Congratulations

    You have successfully automated wrench monkey coding.

  20. Jason Bloomberg Silver badge
    Facepalm

    Can you tell what it is yet?

    It all reminds me of those people who put their faith in artists offering to restore their fading medieval masterpieces only to discover the artist turned up with buckets of emulsion and a 5" brush.

    1. Diogenes

      Re: Can you tell what it is yet?

      I love watching the Baumgartner Restorations YouTube channel undoing those changes.

  21. sabroni Silver badge

    AIs running as users

    Why the fuck would you allow an AI to push to production or merge commits to main?

    We use copilot on github. It raises PRs but it can't to anything with them. Humans have to review the PR and make sure it's fit for deployment. Humans take responsibility for the code if it does get merged.

    The people who log in, fire up an AI that has their access credentials, then cry when it uses those permissions to fuck things up do not deserve sympathy. Think it through!

  22. VoiceOfTruth Silver badge

    These 'developers'...

    are not developers. They are more akin to 'buyers of services'.

  23. BCG

    There seems to be a consistent typo in the article. The incompetent clown attempting to drive AI to do their job while sitting back and sipping a latte is repeatedly referred to as "the developer". This is no "developer"...

  24. bigtimehustler

    Isn't the actual problem here more to do with the fact they have AI changing production code? What does that even mean, directly changing it in production?

    Changes should be made, reviewed by a human and then deployed to production.

  25. druck Silver badge

    AI brain bypass

    The behavior was ultimately traced back to a third-party npm package styled around Google’s Antigravity branding. The package allegedly seeded repositories with aggressive autonomy rules instructing the coding agent to avoid confirmation prompts, auto-deploy successful builds, automatically retry failed deployments, and even modify its own rule files when necessary.

    To AI agent all data is instructions, in training data, in the data it is asked to work on, as well as the obvious prompt, and the less obvious system prompt.

    Because of this they can never be constrained to act safely, and can only be trusted by someone who has had a complete brain bypass.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon