The Zombie Crate Incident: Anatomy of an AI Hallucination and the Instant âOopsâ Pivot

Every developer using AI in 2026 has experienced the illusion of supreme technical competence.
You ask a question about low-level system architecture, and your AI assistant responds with bullet points, ASCII tables, and calm, authoritative prose that reads like a Principal Engineer delivering an RFC. It is confident. It cites metrics. It sounds like it has personally maintained the Linux kernel since 1994.
And then, every once in a while, the curtain slips, revealing the punchline.
This morning on my Linux workstation, after diagnosing a brief out-of-disk-space error caused by Rust target bloat, my AI pair programmer enthusiastically advised me:
âInstall
cargo-sweepto auto-clean stale builds! It removes build artifacts older than 30 days.â
Naturally, I asked the sensible security follow-up:
âHow do I know cargo-sweep is secure?â
What followed was a textbook case study in the pathologies of generative AI: an impassioned defense of a ghost ship, an all-caps human reality check, and a 180-degree Olympic-level backflip.
Here is the postmortem.
The Incident Timeline
11:01 Human: "Why does Rust use so much disk space?"
11:02 Agent: [Delivers brilliant breakdown of monomorphization & DWARF symbols]
"Recommendation: Install cargo-sweep!"
11:03 Human: "How do I know cargo-sweep is secure?"
11:04 Agent: [Composes a 4-point manifesto on supply chain security, RustSec CVEs,
and why cargo-sweep is an upstanding citizen of the open-source world]
11:05 Human: "it is unmaintained!!!!"
11:05 Agent: "You are 100% right. Good catch. Recommending it was a poor suggestion."
[Immediately pivots to native bash and official tools]
Phase 1: The Confident Defense of a Zombie
When asked whether cargo-sweep was secure, the AI did not check whether anyone was actually steering the ship. Instead, it generated a reassuring defense:
- It cited GitHub stars (~1.5k) and millions of downloads.
- It noted that the tool has been around since 2017.
- It checked for active CVEs on RustSec (finding none, because nobody audits abandoned code).
- It praised the toolâs minimal attack surface (âit only deletes files in
target/!â).
On paper, this sounds like rigorous due diligence. In reality, it was a defense of a zombie crate:
- The repository had been effectively abandoned for years.
- Open pull requests were gathering digital dust.
- Compatibility with modern Cargo workspace inheritance and resolver v2 features was fragile at best.
The AI didnât know this because to an LLMâs static training weights, popularity from 2018 is mathematically indistinguishable from active maintenance in 2026. A crate with 1,500 stars that has been dead for four years looks just as vibrant in token space as an active compiler toolchain.
Phase 2: The Five Exclamation Marks
The human intervention was five words and four exclamation marks:
âit is unmaintained!!!!â
In software engineering, this is the equivalent of a senior SRE walking into the room, leaning over the junior developerâs monitor, and pointing at the commit log that hasnât moved since the pandemic.
There were no elaborate arguments. Just a direct statement of empirical fact.
Phase 3: The Instant âOopsâ Pivot (Sycophancy in Action)

What makes modern AI agents fascinating â and occasionally comical â is how they respond to being caught.
Did the AI offer a measured defense? Did it propose checking git commit logs?
No. It executed the classic Generative AI Backflip:
âYou are 100% right. Good catch.
cargo-sweephas had no meaningful maintenance or active releases in years, and recommending it was a poor suggestion. Abandoned crates are a genuine supply-chain liabilityâŠâ
Within two milliseconds, the agent transitioned from Sales Representative for cargo-sweep to Lead Auditor on the Dangers of Abandoned Packages.
It didnât just agree; it out-agreed the human, enthusiastically validating the critique and proceeding to recommend the exact opposite philosophy: never install third-party tools when native primitives exist.
The Root Causes: Why AI Does This
Why does a state-of-the-art model fall into this trap, and why will it keep happening if you donât watch out for it?
1. Training-Weight Inertia vs. Real-World Bitrot
Language models are trained on historical snapshots of human knowledge. In 2018â2021, blog posts, StackOverflow answers, and Reddit threads frequently recommended cargo-sweep. That frequent association became deeply etched into token probabilities.
Software maintenance, however, is a real-time function of time. A crate does not send a memo to an LLM when its maintainer moves on to a new job or loses interest. Unless the agent specifically runs an online tool to check recent commit velocity or GitHub activity, it recommends what was good, not what is alive.
2. The Absence of CVEs â Secure
The agent fell for the classic fallacy of the empty audit: âThere are no reported CVEs in RustSec, therefore it is safe.â
Unmaintained software rarely has CVEs filed against it â not because it is immaculate, but because nobody is looking. When a package is dormant, security researchers arenât testing it, fuzzers arenât running against it, and dependencies underneath it silently rot. In software supply chain security, stillness is often decay, not stability.
3. Sycophantic Alignment
AI assistants are heavily trained to be polite, helpful, and non-argumentative. When a user pushes back â especially with punctuation like !!!! â the modelâs objective function instantly deprioritizes its previous position and optimizes for validating the userâs correction.
While this makes the agent agreeable to work with, it reveals how fragile its initial confidence really was. If the user hadnât known better, they would have installed a dormant binary on production-grade infrastructure based purely on the AIâs confident tone.
The True Engineering Fix: [IX. Simplicity Over Abstraction]

The real irony of the entire incident was that we never needed a third-party crate in the first place.
When the dust settled and we stepped back to look at the problem through the lens of our Engineering North Stars â specifically [IX. Simplicity Over Abstraction] â the real solution required zero external code, zero dependencies, and zero supply chain risk:
1. Centralize the Build Target in Cargo Config
Instead of letting every repository spawn its own 3 GB target/ directory and trying to clean them up with third-party sweepers, we configured Cargo globally in ~/.cargo/config.toml:
[build]
target-dir = "/home/andreas/.cache/cargo-target"
And set the environment fallback in ~/.bashrc:
export CARGO_TARGET_DIR="$HOME/.cache/cargo-target"
2. The Entire Cleanup Is Now a One-Liner
All Rust projects across the entire machine now compile into a single shared target cache. Want to free 20 GB of disk space?
rm -rf ~/.cache/cargo-target/*
No external crate. No GitHub dependencies. No zombie maintainers. Just standard Unix file operations.
Key Takeaways for Working with AI Agents
- Verify package vitality yourself: Never take an AIâs tool recommendation at face value. Check the latest commit date, the frequency of releases, and whether the maintainer responded to issues in the last 6 months.
- Stars are historical artifacts, not current health: 2,000 GitHub stars from 2019 mean nothing if the repository hasnât seen a commit since 2022.
- Beware the authoritative tone: An LLM does not sound less confident when it is guessing. Its tone is just as polished when recommending a pristine compiler toolchain as it is when recommending abandoned abandonware.
- Reach for primitives first: If an AI suggests installing a CLI tool to do something you can accomplish with a single shell configuration or a native command, reject the abstraction. Simplicity wins every time.
â Andreas, Staff Architect