Repository navigation
Description
Problem
In Codex desktop on Windows, an explicitly user-authorized cleanup was rejected before process execution with:
exec_command failed: CreateProcess { message: "Rejected(... rejected: blocked by policy)" }
The user needed to recover disk space (approximately 41 MiB free at initial inspection). Read-only inspection identified 12,869 redundant JSON report files, approximately 22.04 GiB logical size. SHA-256 verification of each deletion candidate and its designated retained copy completed with zero errors. Unique evidence, all run summaries, rollback records, failed/incomplete/mutating runs, and recent report folders were excluded.
Two cleanup command forms were rejected: regenerable cache cleanup, and later manifest-directed individual-file deletion after explicit user authorization. No deletion occurred. The exact policy layer responsible is unknown. This is a report of existing rejection records; no additional deletion reproduction is being attempted.
Environment and observations
- Codex desktop, native Windows PowerShell; exact desktop/runtime versions were not collected.
- Incident date: 2026-10-03, Asia/Dubai.
- Session instructions reported
sandbox_mode = danger-full-access, filesystem access unrestricted, andapproval_policy = never. - Individual-file cleanup used native PowerShell
Remove-Item -LiteralPath, validated resolved absolute target and retained-copy paths against the project root, and required the retained file to exist. - The command was submitted through
tools.exec_commandwithinfunctions.exec. - Read-only commands continued working.
- Inspection of the user rules file found 126
allowdecisions and noforbiddendecisions. - No additional project or ancestor config/rules restriction was found in the inspected locations. This does not establish absence of managed or internal restrictions.
- A focused recent local log query did not expose a matched rule or denial rationale.
- No permissions or policies were changed and no alternative channel was used to bypass the rejection.
- The assistant initially attributed the error to automatic approval review, then corrected that unsupported attribution: the raw error does not establish which component rejected the command.
Expected diagnostic
Please identify the enforcing component and matched rule, or expose a correlation identifier and actionable reason when returning "blocked by policy." Please clarify whether approval_policy = never contributed and what supported resolution is appropriate without disabling protections globally.
This report does not assert that the command must be allowed. It requests diagnosis of why the operation was denied and a supported recovery path.
Related reports
- Windows Codex isolated service launch blocked by policy #44695
- Codex Windows: local API launch rejected with "blocked by policy" #41779
- Windows: validation commands rejected with ‘blocked by policy’ without an actionable diagnostic #46012
Personal filesystem paths, project source/evidence contents, account details, and full transcripts are intentionally omitted.
Activity
github-actions commentedon Oct 3, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action