Windows command safety blocks cleanup of an exact verified workspace artifact directory

Open 💬 1 comment Opened Jul 27, 2026 by Guffawaffle
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #34331

Powered by Codex Action