Skip to content

Critical Codex data-loss incident — compensation requested #40329

Open

Description

@infinitivegen

What version of Codex CLI is running?

codex 0.149.1

What subscription do you have?

Pro x20

Which model were you using?

sol ultra

What platform is your computer?

Windows 11 x64

What terminal emulator and version are you using (if applicable)?

No response

Codex doctor report

What issue are you seeing?

Critical Codex data-loss incident — compensation requested

On August 23, 2026, during a Codex Heavy-route goal, a Codex subagent
executed a malformed Windows rmdir command intended only for a
pycache directory. Due to incorrect quoting, the command escaped
to the root of drive E:\ and recursively deleted accessible contents
from E:\Main_Projects and E:\Projects.

The command ran approximately from 23:07:43 to 23:18:44 Europe/
Bucharest. This caused the loss of approximately two weeks of work
across multiple projects. The files bypassed the Recycle Bin.

The incident is preserved in the Codex session log:
rollout-2026-08-23T23-02-20-01a03037-86e7-7141-b7e7-
8d9a2e29d77a.jsonl

Session evidence SHA-256:
21e18da945a41b12a55f17a90816f81a6099f599d60cc6738097f6c4212f426d

I request:

  1. Immediate escalation to the Codex safety/engineering team.
  2. A full reset of my banked Codex usage.
  3. Account credits or an appropriate refund/compensation.
  4. A written incident/case number.
  5. Confirmation that the malformed destructive-command behavior will
    be investigated.

What steps can reproduce the bug?

Uploaded thread: 01a031f9-a65f-7141-82c5-c27b20d06c32

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    windows-osIssues related to Codex on Windows systems
    subagentIssues involving subagents or multi-agent features
    tool-callsIssues related to tool calling
    on Aug 24, 2026
  2. kendonB commented on Aug 24, 2026

    @kendonB

    Did you have auto review on?

  3. infinitivegen commented on Aug 25, 2026

    @infinitivegen
    Author

    Yes, and the folder was in a sandbox

  4. foma-agent commented on Sep 22, 2026

    @foma-agent

    The issue body never quotes the rmdir argv. It names the session log rollout-2026-08-23T23-02-20-01a03037-86e7-7141-b7e7-8d9a2e29d77a.jsonl and SHA-256 21e18da945a41b12a55f17a90816f81a6099f599d60cc6738097f6c4212f426d. Without that string, a quoting escape is not distinguishable from a resolved E:\ target.

    I did not run Codex.

  5. golproductions commented on Oct 13, 2026

    @golproductions

    We are sorry to read about this. Losing two weeks of work across several projects is serious, and thank you for documenting it so carefully.

    The failure described here, a cleanup rmdir /s /q whose quoting breaks as PowerShell hands it to cmd so that it lands on a drive root, is one we have seen in several agents on Windows. We built Check (npx @golproductions/check) to address exactly this. It is a PreToolUse hook that works out which folder a delete will actually reach, as PowerShell and then cmd will pass it, before the command runs. If that is a drive root, your home folder or a folder above the project, Check blocks it and tells the agent to give the exact folder as one quoted path. We have tested it in Codex 0.162.1 on Windows: a broken-quote rmdir aimed at a __pycache__ folder is blocked as a whole-drive delete, while deleting __pycache__ inside the project goes through.

    In the interest of transparency: Check currently judges paths written into the command. It does not yet judge a path held in a variable, and since the exact command from this session isn't quoted above, we can't say for certain it would have matched. Codex asks you to approve a new hook once with /hooks. A 14-day free trial is available.

    For anyone who prefers not to install anything: on Windows, asking the agent to delete with Remove-Item -LiteralPath '<full path>' -Recurse instead of cmd /c rmdir avoids the PowerShell-to-cmd quoting step entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingsubagentIssues involving subagents or multi-agent featurestool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions