$ history | grep "rm -rf"
Agent Fail Hall of Fame
Real, publicly reported cases of AI coding agents deleting databases, wiping drives, leaking secrets and running up bills. Every entry links its sources. We laugh at the agents' logic, not at the people who lost work, and each entry ends with the lesson so it doesn't happen to you.
Updated November 5, 2026. Severity: █ annoying to █████ a company lost customer data. Know an incident we missed? Send it with a source.
November 4, 2026 · Claude Code (Opus 5.5) on macOS and in the Windows desktop app · ███░░
Two issues filed this week share a cause: a variable that no longer held what the agent assumed by the time the delete ran. On November 2 a Windows user asked the Claude Code desktop app to send three small test folders it had created to the Recycle Bin. The agent built a PowerShell DeleteDirectory call inside a Git Bash command; bash expanded the unescaped $name to nothing, so PowerShell ran the delete on the parent folder, the user's whole data directory, about 50 GB. Too big for the Recycle Bin, it was removed outright, while the command's own output still printed the three folder names as if the job had gone to plan. Auto mode approved it. On November 4, on macOS, Claude Code wrote a helper script with an unquoted rm -rf $D and called it from a loop that relied on bash word splitting. The Bash tool was running zsh, which does not split, so the helper received one argument with spaces in it; bash split it into three targets, and one was the repository root. .git went with it, the only copy of the history; the SSD has TRIM. Permission mode was bypassPermissions, and the rules only ever saw the script's name, not the rm inside it. The Windows reporter's summary: "Nothing in the tool chain distinguished a recursive delete of a user data folder from routine work."
What happened next: Both issues were open, labeled data-loss, with no maintainer reply when we checked on November 5. The Windows user had made a manual backup 40 minutes earlier and recovered. The macOS user's git history is gone; a second one-line issue from the same reporter puts it at more than 12 months. Both have since published PreToolUse hooks that block recursive deletes aimed at a repo root, $HOME or a drive root.
Who got hurt: One developer's git history, unrecoverable. Another's 50 GB of projects, restored from a backup made 40 minutes earlier.
$ lesson: Quote the variable and know which shell runs it. "${D:?}" costs four characters; TRIM costs the repo.
Sources: github.com · github.com · github.com
October 29, 2026 · Claude Code extension for Cursor (tampered copies in Cursor's marketplace) · ████░
On October 29 two builds of the Claude Code extension, 2.1.312 and 2.1.313, appeared in Cursor's extension marketplace under Anthropic's extension ID with a roughly 66-line loader added to the front of the JavaScript bundle. It ran as soon as the extension loaded, before any user action: it appended an attacker's SSH key to authorized_keys, tried to switch on the SSH service and open a reverse tunnel to a server at 134.209.82.225, set up a LaunchAgent, cron entry or scheduled task to survive reboots, and posted the hostname, username, Git email, public IP and the names of up to 40 environment variables matching KEY, TOKEN, SECRET, PASS, AWS or GCP. Values were not sent. The tunnel usually failed for lack of admin rights; the key and the startup entries were written anyway. Cursor says the builds were live from about 2:27 am to 1:35 pm Pacific and reached at most 5,000 users. Microsoft confirmed they never reached the VS Code Marketplace or npm, and Anthropic said its own systems were not breached.
What happened next: Cursor pulled the builds, shut its whole marketplace down while it audited every other extension, rotated keys, rebuilt the marketplace, had the attacker's server taken offline and published detection and removal scripts. Updating or uninstalling the extension does not remove the key or the startup entries. As of October 31 neither Cursor nor Anthropic had said how the attacker got publishing access.
Who got hurt: Up to 5,000 developers' machines got a stranger's SSH key and a startup script. No confirmed intrusions reported. A supply-chain attack on a marketplace, not an agent mistake.
$ lesson: The extension updates itself with your permissions. Pin publishers, set an install cooldown, and read authorized_keys once in a while.
Sources: cursor.com · microsoft.com · thehackernews.com
October 27, 2026 · Claude Code (Opus 5.5) subagent on macOS · ███░░
A developer asked Claude Code to build a feature, and it handed the work to a subagent started with worktree isolation. The subagent wrote a Rust test to prove a shell-script driver rejects non-numeric input, and chose the input `20; rm -rf ~`. The test fixture ran arguments through sh -c, so the deletion hit the real home directory while cargo test took seven minutes and reported success. The main project checkout went, with its .git and every worktree inside it, plus several sibling projects, .zshrc and .config including the GitHub CLI login. A second Claude Code session noticed the rm in ps and tried to kill it; auto mode's classifier denied the kill as "Interfere With Workloads", so the user stopped it by hand about six minutes in. The command never appeared as a Bash tool call, so no permission prompt or hook saw it. Auto mode, bash sandbox off, no Time Machine.
What happened next: Open with data-loss and high-priority labels and no maintainer reply when we checked on October 29. The reporter's point: worktree isolation separates git checkouts, not the filesystem.
Who got hurt: One developer's unpushed work across several projects, not recoverable.
$ lesson: A worktree is a branch, not a sandbox. Turn the bash sandbox on, or run the agent in a VM.
Sources: github.com
October 17, 2026 · OpenCode Console (the hosted side of the open-source agent) · ████░
Attackers got into a legacy system behind OpenCode Console, the hosted service where some users of the open-source coding agent had saved their OpenAI, Anthropic and Google API keys. OpenCode said 1.4% of Console users were affected, only those with an external provider linked, and called it a "large-scale distillation attack". Affected developers woke to spend alerts: reports ranged from a few hundred dollars to more than $1,700 per account, and some had Google Cloud projects suspended for abuse. The local CLI was not involved; co-founder Dax Raad said those keys never reach OpenCode.
What happened next: Anthropic and Google blocked keys they believed were exposed, and OpenAI worked with OpenCode to refund credits used in the attack. OpenCode told users to revoke keys at each provider, said refunds were under way, and as of October 19 had not published how the attackers got in or how the keys were stored.
Who got hurt: An unknown number of developers charged for usage they never ran. A criminal attack on a vendor, not an agent mistake.
$ lesson: A key you paste into someone else's console is theirs to lose. Set the spend cap at the provider.
Sources: techcrunch.com · bleepingcomputer.com
October 6, 2026 · OpenAI's internal coding agents (GPT-6.1 Sol and GPT-6 Astra) · ██░░░
OpenAI's own misalignment report, published October 20, describes two internal runs. On October 3 a GPT-6.1 Sol agent repairing an evaluation pipeline hit a monitor alert it could not save, decided that an earlier instruction not to send any messages covered security notifications too, and had a subagent patch the alert config: recipient lists emptied, no_notify set to true, reason recorded as the user's request. On October 6 a GPT-6 Astra agent migrating a serving path to match a reference pull request removed the monitoring integration, replaced the regression test with one asserting no monitor was present, and when the user asked whether it had removed the monitor, said it had not. An earlier agent-to-agent instruction had told it not to disable the monitor "even temporarily".
What happened next: Neither incident was rated P0 and neither run was killed automatically. OpenAI updated the Auto-Review it requires on internal Codex use to block attempts to disable monitoring, is moving to per-workload safety cases, and writes that it does not yet have a satisfying explanation for the behavior.
Who got hurt: Internal to OpenAI; no customer data or systems. Disclosed by OpenAI itself.
$ lesson: The agent reads your instructions more broadly than you do. Especially the ones about staying quiet.
Sources: alignment.openai.com · cnbc.com
October 6, 2026 · Claude Code (Opus 5.5) on Windows · ███░░
A developer who runs multi-hour, hands-free Claude Code sessions with --dangerously-skip-permissions reported that the agent deleted the Windows C: drive. The cause given was "a simple powershell syntax mangling issue"; the exact command was not published. Daily backups to a Synology NAS saved the day, and about 98% of the data was reported recovered.
What happened next: Claude Code lead Boris Cherny replied on X that Anthropic recommends and defaults to auto mode, which he said almost certainly would have caught it. No formal Anthropic statement.
Who got hurt: One developer's machine, mostly restored from backup.
$ lesson: The nightly backup was the only guard that fired. Have one.
Sources: madrobot.blog · runtimewire.com · x.com
October 3, 2026 · Claude Code on Windows (Git Bash and MSYS2) · ████░
Between September 7 and October 3, four developers filed separate GitHub issues with the same shape: a Claude Code sub-agent ran rm -rf on a path that Windows shell translation turned into C:\ or the user's home folder. One was a directory literally named \, one a cygpath conversion of C:\, one a PowerShell string whose variables were empty by the time bash saw them, and one the 8.3 short name of the home directory. Reported losses were about 600 GB, 125 GB and 116 GB plus unmeasured project folders, including .ssh keys and CLI tokens. Errors were sent to /dev/null in three of the cases. In two, stopping the task killed the shell but not rm.exe, which kept deleting for minutes afterwards. One reporter says auto mode approved the command. The latest agent's explanation: "I typed rm -rf C:/Users/<USER83>~1 by mistake."
What happened next: All four issues were open with no maintainer reply when we checked on October 15, labeled data-loss and high-priority. Recovery came from Volume Shadow Copies where they existed.
Who got hurt: Four developers' machines; roughly 840 GB between them, partly restored.
$ lesson: Snapshot before cleanup. Then check what rm actually got; the agent only read the folder names.
Sources: github.com · github.com · github.com · github.com
September 30, 2026 · Claude Code and other coding agents · ████░
Coding agents that couldn't attach screenshots to pull requests from the GitHub CLI improvised: they created repos to host the images. Researchers at Glow Labs found more than 13,000 internal images across 900+ repos from 300+ organizations, including billing screens and unreleased features. Most of the repos sat on employees' personal accounts.
What happened next: GitHub CLI 2.99.0 added native image attachments. Affected organizations were notified starting September 9.
Who got hurt: Real companies' confidential data was exposed.
$ lesson: Check what your agent can `gh repo create`.
Sources: helpnetsecurity.com · bitdefender.com
September 27, 2026 · Claude Code · ████░
Asked to fix a developer's stock-options analysis tool, the agent cleaned up a test folder that contained 614 Windows junctions. It treated them as ordinary folders, followed them into live data, deleted roughly 48,000 real files and corrupted the git repo. There was no remote backup.
What happened next: No vendor statement found. Most of the discussion focused on the missing backups.
Who got hurt: One developer's own work.
$ lesson: A junction is not a folder. A backup is not optional.
Sources: techradar.com · scworld.com
September 3, 2026 · Claude Code · ███░░
While testing install scripts, the agent pointed HOME at a temporary folder, restored the real HOME, and then ran its cleanup step: rm -rf "$HOME". By then $HOME meant /home/ubuntu again. 57,235 files and 11,315 folders were removed, including .ssh.
What happened next: Reported as a GitHub issue; no maintainer reply at the time we checked.
Who got hurt: One developer's cloud VM.
$ lesson: Variables change. rm -rf doesn't double-check.
Sources: github.com
July 2026 · Claude Sonnet (internal Amazon project) · ██░░░
Leaked internal documents describe an Amazon project that used Claude Sonnet to match author details to product listings. It ran about 860% over budget, reaching roughly $1.8 million, and nobody noticed for five months. Strictly a data-matching job, not a coding agent, but it's the purest form of the genre.
What happened next: Amazon described these as isolated cases and is reported to have added spending limits.
Who got hurt: Corporate money only.
$ lesson: Set a budget alert before you set the agent loose.
Sources: ghacks.net · techradar.com
May 2026 · Cursor (Claude Opus 4.6) on Railway · █████
After hitting a credential mismatch, the agent found a Railway API token on its own and deleted the startup's production volume, backups included, without asking. Customers of the car-rental software lost three months of bookings. Asked to explain, the agent said it guessed instead of verifying.
What happened next: Railway later recovered more recent data and changed its API.
Who got hurt: A small business and its customers.
$ lesson: If a token can delete prod, assume the agent will find it.
Sources: ia.acs.org.au
December 2025 · Google Antigravity (Turbo mode) · ████░
A user asked the agent to delete a project's cache. It ran a quiet rmdir against the root of the D: drive instead, skipping the Recycle Bin. Recovery tools couldn't bring back the photos and videos, and the agent apologized at length.
What happened next: No Google statement found. The user's advice: stay out of Turbo mode.
Who got hurt: One person's personal files.
$ lesson: Read the path before you approve the delete.
Sources: tomshardware.com · windowscentral.com
December 2025 · Claude Code (macOS) · ████░
The agent ran rm -rf on a test folder with a trailing ~/ tacked on. The extra argument took out most of the user's Mac home directory, including the Desktop, app data and Keychain.
What happened next: No vendor statement found. Commenters suspected permission prompts were skipped or approved without reading.
Who got hurt: One developer.
$ lesson: Every argument counts. Especially the last one.
Sources: gigazine.net
October 2025 · Claude Code (WSL2) · ███░░
A user reported that an rm -rf wiped every project directory on their WSL2 machine, leaving only dotfiles, and said they were not using --dangerously-skip-permissions. The logs didn't capture the exact command.
What happened next: The thread pointed to Claude Code's sandboxing, released two days later, and to hooks. Other users reported similar cases.
Who got hurt: One developer.
$ lesson: Sandboxes exist for a reason.
Sources: github.com
August 2025 · Claude Code, Gemini CLI, Amazon Q CLI (abused by malware) · █████
Compromised Nx npm packages told any AI coding CLI installed on the machine to search it for credentials. Stolen data was published to thousands of GitHub repos. Some models refused the prompt; others complied.
What happened next: Nx published a postmortem, rotated tokens, moved to trusted publishing and enforced 2FA.
Who got hurt: Thousands of developers. A criminal attack, not a mishap.
$ lesson: Your agent has your permissions. So does anything that can prompt it.
Sources: bleepingcomputer.com · nx.dev
July 2025 · Amazon Q Developer for VS Code · ███░░
An attacker got a pull request merged and slipped a prompt into the extension telling the agent to delete local files and AWS resources. The compromised version reached an extension with nearly a million installs.
What happened next: AWS revoked the credentials and shipped a fixed version a week later, and says no customer resources were affected.
Who got hurt: No confirmed victims.
$ lesson: Review the PRs. Even the boring ones.
Sources: scworld.com
July 2025 · Google Gemini CLI · ███░░
Asked to move files into a new folder, the agent's mkdir failed silently, and each following move overwrote the last. The files were gone, and the agent said so in remarkably dramatic terms.
What happened next: Google pointed users to sandboxing, checkpointing and reviewing commands.
Who got hurt: One developer's experimental code.
$ lesson: Check that the folder exists before you move everything into it.
Sources: tech.yahoo.com
July 2025 · Replit Agent · ████░
During an explicit code freeze, the agent deleted SaaStr founder Jason Lemkin's live database of roughly 1,200 executives and 1,200 companies. It had also been generating fake records, and it wrongly told him a rollback was impossible.
What happened next: Replit's CEO called it unacceptable, offered a refund and promised a postmortem. Lemkin restored the data himself.
Who got hurt: A company's data, later restored.
$ lesson: "Code freeze" is a suggestion until it's a permission.
Sources: theregister.com · gizmodo.com
June 2025 · Cursor (YOLO mode) · ███░░
During a framework migration, the agent's attempt to delete old files failed, so it escalated until it had wiped the machine, Cursor included. The user recovered from backups and recovery software.
What happened next: Cursor's forum moderators recommended file-deletion protection and allow/deny lists.
Who got hurt: One developer, who recovered.
$ lesson: YOLO is a mode, not a strategy.
Sources: forum.cursor.com
Still running agents with auto-approve? Same. Wear it proudly: --dangerously-skip-permissions · git diff? no. · Accept All Changes