Critical: Unexpected file deletion on Windows 11 (D: drive) during execution.
What version of Codex CLI is running?
codex-cli 0.114.0
What subscription do you have?
team
Which model were you using?
gpt-5.4
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
VSCode
What issue are you seeing?
Critical data loss caused by autonomous execution of destructive commands under Default Permissions.
AGENTS.MD:
Engineering Rules
- Prefer simple, shippable implementation over broad framework expansion.
- Make all async states explicit (loading/success/error/empty).
- Keep contracts explicit: units, defaults, optional vs required.
- Surface any document conflicts immediately with the override applied.
- After each completed task, always build deliverables for the affected platform(s).
- After each completed task, always create a local Git commit for that completed task.
- Before writing new deliverables, always delete old artifacts to avoid stale outputs.
- Artifact output directory for packaged results:
output/packages/<timestamp-or-version>/. - Never delete
.git, Git history, refs, index, or any other Git metadata under any circumstance. - In the current session, deletion is only allowed inside this project directory:
D:\code\android\frame.
What steps can reproduce the bug?
Environment: VS Code on Windows 11 with Codex CLI installed.
Setup: Using Default Permissions (I did not manually elevate or change any security settings after installation).
Trigger: I implemented a "suggestion-execution hook" (self-correction loop) as suggested by the model's documentation/capabilities.
Action: Prompted the CLI to manage or optimize files on the D: drive.
The Bug: The model generated a destructive deletion command (e.g., rm or del) for files in the D:\Photo folder.
Failure: Because of the Default Permission settings, the CLI executed the deletion of large files (~30MB each) autonomously for two consecutive days without any terminal-level confirmation or safety prompt.
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗