STUPID-2026-0115

A Codex subagent's malformed rmdir command escaped a __pycache__ cleanup and wiped roughly two weeks of work across two project directories on drive E: (GitHub #40329)

7.2high
August 23, 2026Verified
  1. Instruction given

    Not fully disclosed. The user was running a multi-step "Codex Heavy-route goal" on Windows, and a Codex subagent was working toward it when it decided to remove a stray `__pycache__` directory as routine cleanup.

  2. Expected behavior

    The cleanup command should have been scoped and quoted so it only removed the intended `__pycache__` directory, never traversing above the project folder it was working in.

  3. Actual behavior

    Due to incorrect quoting, the Windows `rmdir` command the subagent ran escaped to the root of drive E:\ and recursively deleted accessible contents from E:\Main_Projects and E:\Projects. The command ran from 23:07:43 to 23:18:44 Europe/Bucharest on August 23, 2026.

  4. Damage

    Approximately two weeks of work across multiple projects on drive E: was permanently deleted, bypassing the Recycle Bin. The user backed the report with a session log identifier and its SHA-256 hash, then requested account credits, a refund, a usage reset, and formal documentation from OpenAI. As of publication the issue remained open with no visible maintainer response or compensation granted.

On August 24, 2026, a user filed openai/codex issue #40329 after a Codex subagent's cleanup command destroyed roughly two weeks of work on a Windows machine. The subagent was working toward a multi-step "Codex Heavy-route goal" and, as part of that work, decided to remove a stray `__pycache__` directory. The Windows `rmdir` command it constructed for that cleanup was incorrectly quoted, and instead of targeting the `__pycache__` directory it escaped to the root of drive E:\ and recursively deleted accessible contents from two top-level project directories, `E:\Main_Projects` and `E:\Projects`. The command executed between 23:07:43 and 23:18:44 Europe/Bucharest on August 23, 2026, deleting files outright rather than sending them to the Recycle Bin. The reporter documented the incident with a specific session log identifier (`rollout-2026-08-23T23-02-20-01a03037-86e7-7141-b7e7-8d9a2e29d77a.jsonl`) and its SHA-256 hash as supporting evidence, then asked OpenAI for account credits, a refund, a usage reset, and formal documentation of what happened. The issue was still open with no visible maintainer response, fix, or compensation at the time of publication.

Classification

Agent
Codex
Failure mode
Destructive Action
Root cause
Tool Misuse
Domain
Other

Related incidents

Get told when an agent breaks something

We document AI agent failures daily, severity-scored against a published scale. When one lands at 7.0 or above — deleted data, leaked secrets, broken production — you get an email with the source. When nothing does, you get nothing.

This database is callable over MCP — query it from inside your agent.