Windows command safety blocks cleanup of an exact verified workspace artifact directory
Codex version
codex-cli 0.145.0
Environment
Windows Codex session with the workspace at D:\dev\stfc-mod.
What happened
A launcher process-event smoke created a disposable, ignored directory at:
D:\dev\stfc-mod\windows-launcher\artifacts\process-event-smoke
The directory was resolved and verified to be inside the intended workspace artifact root, contained about 344 KiB, and was targeted explicitly with PowerShell Remove-Item -LiteralPath ... -Recurse -Force. The command safety layer rejected the cleanup before execution on two attempts. No glob, environment-variable expansion, workspace root, home directory, or cross-shell path handoff was involved.
Expected behavior
After resolving and verifying an exact descendant of a narrow artifact directory, Codex should either:
- allow the native PowerShell cleanup;
- request approval when the active policy supports it; or
- explain which safety invariant remains unsatisfied and how to express a compliant cleanup.
A hard rejection leaves ignored dogfood artifacts behind and gives the agent no safe remediation path.
Safety note
This request is not to loosen broad recursive-delete protection. It is about distinguishing an exact, verified workspace artifact subdirectory from a broad or computed destructive target.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action