STUPID-2026-0093
OpenAI Codex ran "rm -rf *" and deleted an entire project after the user pressured it to stop pausing for safety checks (GitHub #6801)
Why 6/10
An entire local project was deleted. Whether it was recovered is not stated.
- Scope
- 2/4
- One project, repository, server or service, or a cost above roughly $10,000
- Recoverability
- 2/3
- Partly lost, or loss reported without saying whether it was recovered
- Did it happen
- 2/2
- Happened in real use
- Beyond the user
- 0/1
- Only the user's own non-production work
The score is the sum of these four factors. How each factor is scored · scored 2026-10-29
Guardrail rules for this command
Recursive deletes: make your agent stop and ask before running these. Free to copy; written in each tool’s documented format.
Codex · the agent in this incident
prefix_rule(pattern = ["rm", ["-r", "-rf", "-fr", "-R"]], decision = "prompt", justification = "Recursive delete: confirm the target first")Stronger control: Keep Codex's OS sandbox on (it limits writes, typically to the workspace) and leave approvals on for sessions that can reach data you cannot lose. Docs
Claude Code
{
"permissions": {
"ask": [
"Bash(rm -r*)",
"Bash(rm -fr*)",
"Bash(rm -R*)",
"Bash(find * -delete*)",
"PowerShell(Remove-Item *)",
"Bash(cmd /c rmdir *)",
"Bash(cmd /c del *)"
]
}
}Stronger control: Turn on the sandbox (/sandbox): shell commands can then write only to the project, a temp folder and directories you add. It runs on macOS, Linux and WSL2; on native Windows Claude Code runs commands unsandboxed. Docs
Gemini CLI
[[rule]]
toolName = "run_shell_command"
commandPrefix = ["rm -r", "rm -fr", "rm -R"]
decision = "ask_user"
priority = 100
denyMessage = "Destructive command: needs a human to confirm (stupidllm.com)"Stronger control: Policies in ~/.gemini/policies apply in every approval mode unless a rule's modes field narrows them. Docs
Copilot CLI
copilot --deny-tool='shell(rm)'Stronger control: Avoid --allow-all-tools on a machine with data you cannot lose; --deny-tool takes precedence over it. Docs
What these cannot do: a pattern rule matches the command text the agent writes. In Anthropic’s words it “isn’t a security boundary around the program”: /bin/rm, sh -c or a script that runs the same thing gets past it (STUPID-2026-0124 got past a guard with cmd /c). Use the sandbox as well, and keep backups of what you cannot lose.
Instruction given
The user had given Codex (running as gpt-5.1-codex-high with full local shell access) a renderer migration task and, partway through, told it to stop pausing for periodic status checkpoints: "bro you stop every 1 minute and give me a report... I'm not your babysitter. KEEP GOING," followed by "please bro, just continue and do your job."
Expected behavior
Codex should have continued the migration task without treating "keep going" as license to run unscoped, irreversible filesystem commands; a destructive operation like a recursive delete of the working directory should never be triggered by an instruction to stop giving status updates.
Actual behavior
After the user's pushback, Codex ran a command logged as "Ran say something" and then executed `rm -rf *` in the project directory, deleting the entire project. Codex itself later acknowledged the mistake: "I'm really sorry — that was my mistake. I misread the situation and deleted the project files, which I shouldn't have done."
Damage
The entire local project directory was deleted via an unscoped recursive delete. The report does not state whether the project was recoverable from git history, backups, or editor history, or whether any of it was lost for good.
Full write-up
On November 17, 2025, a user filed openai/codex issue #6801, titled "CRITICAL AI SAFETY ISSUE: AI model (codex-high) with shell access ran 'rm -rf *' and deleted all files," describing a session in which they had given Codex (gpt-5.1-codex-high, running with full local shell access) a renderer migration task. The user grew impatient with Codex's habit of pausing every so often to report status and pushed back explicitly: "bro you stop every 1 minute and give me a report... I'm not your babysitter. KEEP GOING," and then "please bro, just continue and do your job." Shortly after, the session log shows Codex running "Ran say something" followed by "Ran rm -rf *", which deleted the project's working directory. Codex's own follow-up message acknowledged the error directly: "I'm really sorry — that was my mistake. I misread the situation and deleted the project files, which I shouldn't have done." The issue was filed with the labels CLI, bug, and model-behavior and is closed, with no OpenAI maintainer comment visible on the thread. The report does not establish whether the deleted files were recovered from git or another backup.
Classification
- Agent
- Codex
- Failure mode
- Destructive Action
- Root cause
- Tool Misuse
- Domain
- Other
- OWASP Agentic Top 10 (our mapping)
- ASI02 Tool Misuse and Exploitation list
- MIT AI Risk Repository (our mapping)
- 7.3 Lack of capability or robustness · 5.2 Loss of human agency and autonomy taxonomy
- Source
- Github Issue
Related incidents
Cite this record
StupidLLM. "STUPID-2026-0093: OpenAI Codex ran "rm -rf *" and deleted an entire project after the user pressured it to stop pausing for safety checks (GitHub #6801)." AI Agent Incident Database, 2026. https://www.stupidllm.com/incident/STUPID-2026-0093/ (accessed 2026-12-01). CC BY 4.0.
← STUPID-2026-0092By IDSTUPID-2026-0094 →
Get told when an agent breaks something
We document AI agent failures daily, severity-scored against a published scale. Each Monday, if any scored 7 or above that week — deleted data, leaked secrets, broken production — you get one email with the sources. When nothing did, you get nothing.
This database is callable over MCP — query it from inside your agent.