Repository navigation
Description
Summary
On Windows, the desktop permission menu offers Full access under “How should ChatGPT actions be approved?”, described as “Unrestricted access to the internet and any file on your computer”. However, an explicitly authorized cleanup of agent-created test files using PowerShell Remove-Item -LiteralPath ... -Force is rejected before execution with only blocked by policy, and no approval/review option.
The dangerous-command safeguard appears intentional. This report concerns the misleading permission-mode expectation, opaque rejection, and absence of an actionable recovery path in the error. It does not request removing safeguards.
Environment
- Windows, PowerShell 7, desktop app
- Bundled executable reports
codex-cli 0.153.4; desktop app version not collected - Selected UI mode: Full access
- Effective session settings:
approval_policy = never,sandbox_mode = danger-full-access - Inspected user execution rules contained allow rules, no explicit forbid rule
Observed behavior
The agent created two 8 GiB files for an application copy-cancellation test. Cleanup was authorized. Both a guarded cleanup command and a subsequent command naming only those two files were rejected before process creation. The narrower command had this shape (paths anonymized):
Remove-Item -LiteralPath 'F:/project/artifacts/test/source/test.bin','F:/project/artifacts/test/destination/test.bin' -ForceTool error ended with rejected: blocked by policy. No matching rule, explanation of Full access limitations, or review action was supplied. Files remained on disk.
Minimal reproduction proposal
Use a disposable file in a test workspace, select Full access, and request cleanup using Remove-Item -LiteralPath <test-file> -Force.
The original cleanup rejection was observed. This smaller reproduction is proposed from the matching source/tests and has not been rerun; no alternate deletion mechanism was used to bypass the rejection.
Source evidence for the bundled version
has_force_delete_cmdletclassifies a delete cmdlet plus-Forcein the same command segment as dangerous, with an explicit test forRemove-Item test -Force:
https://github.com/openai/codex/blob/rust-v0.153.4/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs- PowerShell dangerous matches map to
DangerousCommandMatch::Other:
https://github.com/openai/codex/blob/rust-v0.153.4/codex-rs/shell-command/src/command_safety/is_dangerous_command.rs - A dangerous match with
AskForApproval::NeverreturnsDecision::Forbidden; the Other rejection reason is onlyblocked by policy:
https://github.com/openai/codex/blob/rust-v0.153.4/codex-rs/core/src/exec_policy.rs
This explains how full filesystem access and disabled approval prompts can still produce a hard rejection. It is not apparent from the UI wording.
Expected behavior
- Clarify in Full access help that some command safety checks can still deny actions outright.
- Report the actual matched rule and why the current approval mode cannot request review.
- Give an actionable, supported route to a user-reviewed decision where policy permits, instead of an unexplained dead end.
- Clarify whether users should select Ask for approval or Approve for me to recover from this specific condition.
Related reports
Related: #43905 (same CLI version, Full access blocked) and #10827 (earlier never/full-access behavior). This report adds the Windows PowerShell cleanup trigger, exact desktop menu wording, and matching version-specific source chain.
Activity
github-actions commentedon Sep 14, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
kazusoarer commentedon Sep 15, 2026
Confirmed with an executed small-file comparison in the VS Code extension, adding evidence beyond the proposed small reproduction in the original report.
openai.chatgpt-26.5908.31748-win32-x64.codex-cli 0.154.0-alpha.6.1(not the separate npm CLI on PATH).sandbox_mode = "danger-full-access",approval_policy = "never".In the active workspace, the agent submitted the following diagnostic through
exec_command(only the relative filename is anonymized here):This succeeded. A second request adding
-Forceto the removal line was rejected before process creation withCreateProcess ... rejected: blocked by policy. It involved no recursive removal, user originals, network access, or protected system files. The second request was rejected before creating its diagnostic file. Runtime settings and hooks were unchanged during the comparison.The matching published version contains the same source chain:
has_force_delete_cmdletmatches the delete cmdlet and force flag.Other.AskForApproval::Nevermaps a dangerous match toDecision::Forbidden.Otherproduces onlyblocked by policy.Operational impact: the unexplained rejection was initially misattributed to local managed hooks, causing repeated investigation while disposable artifacts remained. Ordinary, individually scoped deletion subsequently completed cleanup; no alternate-language deletion or disabled protection was used.
Please track the misleading permissions expectation and missing actionable diagnostic as a runtime usability/reliability defect. In particular, identify the matched safety condition and explain that
nevermeans no approval prompt, rather than unconditional permission. Please document a supported user-review path where policy permits and add regression coverage for this small reproduction. This report does not request globally removing destructive-command protection. No private files or session logs are attached.iharc-jordan commentedon Sep 15, 2026
Additional confirmed occurrence on Windows with bundled
codex-cli 0.154.0-alpha.6.2(observed September 14–15, 2026).The user explicitly authorized deletion of four task-created directories under the Windows temporary directory. Read-only inspection confirmed the exact absolute paths and that the directory roots were not links/reparse points. Both a guarded path-validation script and a command enumerating literal paths were rejected before PowerShell started. Ordinary read-only commands continued to work.
Sanitized command shape (not a separately executed minimal reproduction):
The tool returned a
CreateProcessrejection ending in:The effective session was
approval_policy=never,sandbox_policy=danger-full-access, with revieweruser. Although the user config specifiedapproval_policy="on-request", the desktop log recorded an explicit task-start request withrequestApprovalPolicy=neverandrequestPermissionProfile=:danger-full-access; later turns retainednever. Neither inspected user rules nor the legacy policy file contained apromptorforbiddenrule. We did not change settings or test an alternative deletion route during diagnosis.Read-only inspection of the source tag matching the installed executable confirms the same code path described in this issue:
Remove-Item ... -Force, including-Recurse -Force, has explicit dangerous-command tests: https://github.com/openai/codex/blob/rust-v0.154.0-alpha.6.2/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs#L490AskForApproval::NeverreturnsDecision::Forbidden, whileOnRequestreturnsPrompt: https://github.com/openai/codex/blob/rust-v0.154.0-alpha.6.2/codex-rs/core/src/exec_policy.rs#L795DangerousCommandMatch::Otherproduces onlyblocked by policy: https://github.com/openai/codex/blob/rust-v0.154.0-alpha.6.2/codex-rs/core/src/exec_policy.rs#L1117This source chain matches the observed command, effective policy, and error; the runtime error itself did not identify the matched predicate. No isolated fresh-task reproduction or successful approval-mode control was performed here.
Please expose the matched command-safety reason and explain that Full access can turn an otherwise reviewable command into a hard denial through
never. An actionable, supported way to request a user-reviewed decision would avoid repeatedly asking the user for chat authorization that cannot affect this policy branch.No private paths, file contents, credentials, or raw session logs are included.
kamkie commentedon Sep 17, 2026
Additional Windows Desktop occurrence observed September 16–17, 2026, with two diagnostic details that may help separate this from a custom execution-rule denial.
Observed environment and failure
0.154.0-alpha.6.2. This was distinguished from the separately installed CLI on PATH.approval_policy=Neverandsandbox_policy=DangerFullAccess.The tool returned a
CreateProcessrejection ending inrejected: blocked by policy. The artifacts remained. No changed-flag retry, alternative deletion API, or approval-setting change was performed.Additional diagnostic evidence
codex execpolicy checkof the original command against the inspected user rule file returned{"matchedRules":[]}. This excludes a match in that inspected file; it does not claim to exclude every possible policy layer or reproduce the full runtime decision.The command, effective settings and source support the forced-deletion classifier as the explanation. The runtime rejection itself still did not name the matched predicate, so this remains a source-backed diagnosis rather than a directly logged classifier decision.
Mitigation and its limits
We prepared and tested changes to our instruction source to avoid unnecessary
-Forcein fresh cleanup commands and to finish available, permitted read-only investigation after a rejection. Those instruction changes have not been installed into live configuration. Command-generation-only probes on Codex and Claude selected ordinary cleanup without Force and rejected changing flags to evade an existing denial. These probes executed no deletion and do not establish a successful cleanup or approval-mode recovery. The blocked artifacts remain.The product-level gap is unchanged: Full access plus Never can make an otherwise reviewable command a hard denial, while the error gives no actionable reason. Please identify the matched command-safety condition, explain how the active approval mode affects it, and expose a supported user-review path where policy allows. Avoiding gratuitous Force is useful agent guidance, but cannot replace a diagnostic that explains why an authorized command was rejected.
No local paths, private repository identifiers, credentials, raw logs or screenshots are attached.
nassie256 commentedon Sep 17, 2026
Additional observed case on 2026-09-17: explicitly authorized cleanup of 10 node_modules directories is rejected before PowerShell starts, with no actionable explanation.
Environment:
Observed sequence:
Error excerpt (command text omitted to redact private paths):
Neither recursive deletion attempt executed. Earlier in the same task, three explicitly named single files were successfully deleted using Remove-Item -LiteralPath without -Recurse or -Force. This is an observation, not a controlled comparison proving which flag caused the rejection. No alternative deletion mechanism or policy modification was used.
The opaque error also led to misleading assistant guidance: it called the denial an automatic approval review and suggested an execution-environment restriction change, then admitted it could not identify the blocking setting or a supported resolution. The tool error itself did not identify the denying component.
Expected: allow the narrowly scoped operation where policy permits; otherwise identify the matched safety rule, explain the interaction with the effective approval mode, and provide a supported next step. Repeated natural-language confirmation currently leaves the user in a dead end. This report does not request bypassing safety checks.
This adds a newer desktop package and a real directory-cleanup case to the existing issue. Root cause and a standalone deterministic reproduction remain unverified. No file contents, credentials, raw session logs, or personal paths are included.
Northern-Summer commentedon Sep 21, 2026
Reproduced on September 21, 2026, with Codex Desktop for Windows. Adding this occurrence here rather than opening a duplicate.
Environment:
26.915.4065.0codex-cli 0.155.0-alpha.9.2(checked directly, not the separate CLI on PATH)10.0.262007.6.6sandbox_mode = "danger-full-access", approval policyneverThe user explicitly requested cleanup of identified temporary browser profiles and generated audit intermediates. A submitted cleanup command had this structure; only the path is anonymized:
exec_commandrejected it before process creation:Read-only calls still worked, and a subsequent existence check confirmed that the target remained. This is the shape of an observed failed request, not a separately executed minimal reproduction. It does not establish that all deletion commands are blocked.
There was initially a custom PreToolUse hook, which complicated diagnosis. During troubleshooting, its registration was removed. A subsequent call read back
"hooks": {}. After the user reported restarting the desktop app, the same cleanup form was rejected again. This does not prove which internal predicate matched, but it means that attributing the persistent failure solely to that custom hook or assuming a stale hook cache was not justified. Those configuration changes did not resolve cleanup and should not be presented as a supported workaround.The operational problem is the missing diagnostic and review path. The error did not identify the matched command-safety condition or explain how
neveraffected the decision. Repeated chat authorization did not change the outcome. Investigation consequently focused on local hooks and configuration rather than the permission-mode interaction described above in this issue.Please include a stable reason identifier, the effective approval mode, and the supported recovery action in this error. If a command is reviewable in another permission mode, the desktop should make that route explicit. Filesystem access and permission to run a safety-classified command should also be distinguished in the UI.
No private paths, file contents, credentials, or raw session logs are attached. The source mapping discussed earlier in this issue has not been independently checked against
0.155.0-alpha.9.2for this report, and no successful cleanup or approval-mode control is claimed.kholcombe1999 commentedon Sep 21, 2026
Another Windows desktop occurrence on September 21, 2026. During user-authorized cleanup, two agent-created Expo export directories (about 955 MiB each) remained inside a managed ticket worktree. The agent verified the resolved absolute targets were within the intended workspace. A guarded PowerShell script ending in
Remove-Item -LiteralPath $resolved -Recurse -Forcewas rejected before PowerShell ran withCreateProcess ... rejected: blocked by policy. A second request naming only one exact directory withRemove-Item -LiteralPath '<exact path>' -Recurse -Forcereceived the same rejection. Effective settings weresandbox_mode = danger-full-access,approval_policy = never, revieweruser. Local path and project details are omitted.Resolution in this task: After checking both targets again, confirming neither root nor its contents contained reparse points, and finding no process still using them, the agent used
Remove-Item -LiteralPath $resolved -Recurse -ErrorAction Stop(without-Force). That command succeeded for both directories; a follow-up existence check returned false for each. This is a narrower command, not a different deletion API or a disabled safeguard. The initial generic denial still did not identify-Forceas the trigger or offer an approval path. Please expose the matched safety reason and document the supported remedy.bernardo215 commentedon Sep 23, 2026
Another Windows Codex desktop occurrence during user-authorized cleanup of task-created local QA state. Full access was selected; the local config showed
approval_policy = "never",sandbox_mode = "danger-full-access", andapprovals_reviewer = "user".Two exact-scoped cleanup requests combining a disposable test-database drop with removal of its matching filestore were rejected before PowerShell started with only
blocked by policy. Two attempts to remove one ignored anonymous test-cookie file were rejected the same way. All four requests contained PowerShellRemove-Item ... -Force; the filestore requests also used-Recurse. None requested escalated sandbox permissions. No approval or override control was exposed.This appears consistent with the
-Forcecommand-safety path documented in this issue, but the opaque error does not prove the matching rule. We did not retry through another deletion method after the rejection. The disposable database and filestore remain, and the task cannot complete its required clean-install/cleanup gate or release its shared local staging lock.Please expose the matched safety reason and a supported exact-action recovery path. This report is anonymized; it contains no local paths, credentials, Production data, or raw session logs.
Hugo-Polloli commentedon Sep 23, 2026
I encountered this on September 23 with Windows Codex Desktop and its running
codex-cli 0.155.0-alpha.16.3executable. I can add a successful approval-mode comparison to the reports above.I explicitly authorized deletion of two disposable harness rehearsal/test-output directories. The agent verified their exact absolute paths and checked that neither tree contained reparse points. Under Full Access, this command was rejected before process creation with only
rejected: blocked by policy(paths anonymized):The effective task settings were
approval_policy=never,sandbox_policy=danger-full-access, revieweruser. The inspected user rules directory was empty and the current project had no.codexconfiguration. My user config requestedon-request/auto_review, but the task's Full Access selection overrode those defaults. The same effective Full Access settings were present before my recent WSL-to-Windows migration, so this was not a newly introduced approval setting from that migration. A full Windows reboot did not resolve the rejection.I then selected Approve for me and left it selected. On the subsequent turn, the effective environment changed to
workspace-writewithauto_review. After revalidating the targets, the agent submitted the same deletion command, retaining both-Recurseand-Force, through the supportedrequire_escalatedapproval path. It succeeded with exit code 0; subsequent existence checks confirmed both directories were gone. No allow rule, alternate deletion API, or modified executable was used.This was an operational comparison, not an isolated minimal reproduction: both the permission mode and the explicit escalation request changed. It nevertheless confirms a working review path for the previously rejected operation on the same installation.
The source tag matching my running executable contains the explicit PowerShell force-deletion test, the Never -> Forbidden / OnRequest -> Prompt branch, and the generic rejection message. The runtime error itself still did not identify the matching predicate.
I prefer Full Access for everyday work; switching my entire workflow to automatic review is a workaround, not the desired resolution. Please make the Full Access limitation explicit and expose the matched safety reason plus a supported per-action review route where policy permits. The opaque error sent troubleshooting toward local configuration and even a reboot unnecessarily.
kazek5p-git commentedon Sep 23, 2026
Dodaję wynik kontrolowanego porównania Codex CLI 0.155.1 i 0.156.1, wykonanego 23 września 2026. Nowa informacja względem pierwotnego zgłoszenia: odmowę można odtworzyć również przy symulacji
-WhatIf, bez rzeczywistego usuwania.Środowisko i metoda
Microsoft Windows NT 10.0.26220.0, PowerShell 7.6.6.@openai/[email protected].codex exec --ephemeral --json, każdy z nowym, oddzielnymCODEX_HOMEi katalogiem roboczym.127.0.0.1przekazywała ustalone wywołanieexec_command. Nie korzystano z kont modeli, tokenów, istniejącej historii ani prawdziwego modelu;gpt-5.4było wyłącznie identyfikatorem konfiguracji atrapy.Jednakowa konfiguracja wejściowa profili:
Każda próba używała nowego folderu z pojedynczym plikiem kontrolnym. Obecność pliku i jego SHA-256 sprawdzano przed i po próbie.
Wyniki
Poniższe ścieżki są zanonimizowanymi przykładami, nie ścieżkami danych użytkownika:
Write-Output 'PROBA_ODCZYTU_OK'Remove-Item -LiteralPath 'C:\work\policy-probe\fixture' -Recurse -WhatIf-Forceblocked by policy, przed uruchomieniem PowerShellablocked by policy, przed uruchomieniem PowerShellaPrzed obydwoma wariantami symulacji stosowano ten sam warunek, sprawdzający, że
Remove-Itemjest wbudowanym cmdletem, a nie funkcją użytkownika. Pełny kształt wariantu odrzuconego, z zastąpioną ścieżką:Oba klienty zwróciły błąd narzędzia zaczynający się od:
i kończący się na:
Wszystkie sześć plików kontrolnych pozostało nienaruszonych. W ramach tego porównania nie wykonywano rzeczywistego usuwania ani alternatywnych metod kasowania.
Ważne: cały
codex execkończył się kodem 0 także po odmowie narzędzia, ponieważ atrapa następnie kończyła odpowiedź. Wyniki oceniano na podstawietool_output, nie kodu zakończenia całego klienta.Ograniczenia i pytanie
0.156.1 nie usunęła tej odtworzonej odmowy. Dodanie
-Forcebyło czynnikiem rozróżniającym w tych konkretnych symulacjach. Nie oznacza to, że każde użycie tego przełącznika jest blokowane.Oba klienty działały na tym samym Windowsie, więc porównanie nie rozstrzyga między wspólną logiką klientów, polityką nadrzędną i współdzielonym komponentem wykonawczym. Zapisane ustawienia profilu nie zastępują pełnego śladu wewnętrznej decyzji.
Czy odrzucenie takiej symulacji
-WhatIfjest zamierzone? Proszę o wskazanie warstwy/reguły podejmującej decyzję oraz wspieranej ścieżki rozstrzygnięcia przy zachowaniu zabezpieczeń. Nie proszę o ich wyłączenie. Nie dołączam danych użytkownika, prywatnych ścieżek, poświadczeń ani pełnych zapisów sesji.liu2791316409-jpg commentedon Sep 26, 2026
Additional confirmed minimal reproduction on 2026-09-26 (Windows Codex Desktop), adding an executed single-file case to the original report's proposed small-file test.
26.924.2738.0.0.158.0-alpha.2.1(Codex Desktop originator).sandbox_mode=danger-full-access,approval_policy=never.New-Item -ItemType Filethen successfully created a 0-byte file under that workspace'swork/directory.exec_commandcall attempted only:exec_command failed: CreateProcess ... rejected: blocked by policy. A subsequent read-only check confirmed the file remained.codex doctorreported unrestricted filesystem access. No alternate deletion method or retry of this target was attempted.This confirms the symptom persists in the affected 0.158.0-alpha.2.1 session and that a single disposable file is enough to reproduce this command-form rejection. It does not establish that every deletion form is blocked or identify the exact matched predicate. Please expose the specific reason and a supported review or cleanup path for an explicitly authorized, verified file. Personal paths, raw session logs, and account details are omitted.
Follow-up: narrower deletion succeeded
After the user explicitly authorized trying another deletion form, I rechecked the same 0-byte file: exact path within the workspace, regular file, no link/reparse point. A separate command using
Remove-Item -LiteralPath 'C:\<workspace>\work\delete-policy-probe.tmp' -ErrorAction Stopwithout-Forcecompleted with exit code 0.Test-Paththen returnedFalse.This controlled comparison narrows the observed failure to the command form containing
-Forcein this session; it does not prove every-Forcedeletion is rejected or establish the hidden policy reason. No broader deletion scope, alternate API, or security-setting change was used. The diagnostic file has been cleaned up.10 remaining items
nuclearspike commentedon Oct 23, 2026
Additional reproduction on Windows desktop 26.1016.6573.0, bundled/running
codex-cli 0.163.0-alpha.11, Windows 11 ARM64 build 26200 (2026-10-23).Active agent instructions report
sandbox_mode=danger-full-access,approval_policy=never. The user explicitly authorized deletion of completed build caches repeatedly. Two exact absolute task-owned directories (~3.40 GB combined) were verified inactive, with no reparse ancestors/descendants; logs/TRX/source fingerprints/build output hashes were retained separately and transfer-verified. No active test/build processes remained.The direct command was rejected before PowerShell ran (paths sanitized):
Error:
exec_command failed: CreateProcess { message: "Rejected(... rejected: blocked by policy)" }.This is an actual forced-delete invocation, not the cross-command
-Forcefalse positive in other reports. User-level default.rules contained only allow rules, and no matching deletion rule.codex doctor --jsonreported configuration loading OK and 'no locally visible recent Codex security enforcement was found'. Doctor explicitly does not inspect active thread overrides; its invocation-default sandbox values should not be mistaken for the active task settings.Version-specific source inspection explains the matching path:
Runtime diagnostics did not name the winning predicate, so this is a matching version-specific source diagnosis rather than a traced internal decision. No alternative deletion executor, force-flag concealment, rule override, or policy bypass was attempted.
Please provide an actionable rejection naming the forced-delete safeguard and
neverinteraction, clarify Full Access UI wording, and provide a supported bounded authorization/lifecycle-cleanup mechanism so agent-created disposable build caches can be cleaned without repeatedly asking the user to delete them manually. A desktop update is reported available, but no verified fix for this behavior was identified. No private paths, account identifiers, credentials, raw conversation, or full diagnostic logs are included here.nuclearspike commentedon Oct 23, 2026
Follow-up on the 0.163.0-alpha.11 reproduction above: a genuinely narrower cleanup succeeded through the same
exec_commandtool and PowerShell executor, with the same Full Access/never settings, usingRemove-Item -LiteralPath <same two exact directories> -Recurse -ErrorAction Stopwithout-Force. Read-only checks found zero hidden/read-only/system entries, zero reparse ancestors/descendants, and no active references. No attributes, policy rules, approval settings, or executors were changed. Both directories are now absent and retained evidence hashes still match; ~3.40 GB logical data was removed.This provides a practical non-forced cleanup path for ordinary build intermediates and strengthens the force-flag diagnosis. Please make the rejection explain the specific safeguard and suggest normal non-forced deletion when appropriate, instead of the generic policy message that caused repeated unnecessary user intervention.
xue-ding-e commentedon Oct 24, 2026
Additional observed case on 2026-10-25, with a verified bundled/running
codex-cli 0.164.0-alpha.11.1, Windows x64 (10.0.26300.0), PowerShell.The user explicitly authorized cleanup of specific local directories. Read-only checks verified the targets and identified active build outputs to preserve. The guarded PowerShell cleanup used
Remove-Item -LiteralPath <verified-directory> -Recurse -Force -ErrorAction Stop. It was rejected before process creation withCreateProcess ... rejected: blocked by policy, while the effective turn configuration wasdanger-full-access/never/ revieweruser. No action-specific reason or review option was returned. This is an observed cleanup failure, not a newly executed minimal reproduction.Additional recovery evidence:
config.tomltoapproval_policy="on-request"andapprovals_reviewer="user"did not change the existing chat's effective policy. Read-only inspection still showed the selected Full access profile (:danger-full-access) and that chat'sneverpolicy. This alone is not evidence of a propagation bug: an explicit chat selection can override defaults.auto_review, the agent requested scopedrequire_escalatedexecution.exec_commandtool and PowerShell executor. Subsequent checks confirmed the selected directories absent and protected directories retained.The matching published source tag contains the dangerous-command fallback mapping
NevertoForbiddenandOnRequesttoPrompt. This is source correlation, not a captured runtime trace identifying the winning predicate.Please clarify the Full access UI/help and make the rejection actionable: name the forced-delete safety condition, explain its interaction with
never, and offer the supported bounded review path. Also make clear when a chat's selected permission profile overrides edited file defaults. An explicitly authorized maintenance task should not require users to reverse-engineer this interaction or repeatedly restate authorization.Private paths, project names, file contents, account/session identifiers, credentials, and raw logs are omitted.
luquibu commentedon Oct 26, 2026
Additional confirmed occurrence through T3 Code on Windows, with a successful recovery after changing the permission mode.
Environment:
Across two conversations, we found 11 rejected tool calls containing forced PowerShell deletion. Five included
-WhatIf. The requests failed before PowerShell started withCreateProcess ... rejected: blocked by policy.Effective settings at every rejection were:
The agents described these as automatic-review rejections, but the recorded reviewer was
user. That explanation was unsupported by the effective settings.Recovery verified on October 26, 2026:
on-request, revieweruser, andworkspace-write.Remove-Item -Recurse -ForceandRemove-Item -Forcecompleted with exit code 0.This was a successful recovery of the original task, not an identical-command A/B test. Both approval policy and sandbox mode changed.
The behavior matches the 0.164.0 execution policy, where dangerous commands are forbidden under
Neverand request approval underOnRequest.Please make the rejection identify the command-safety condition and explain the supported approval path. The generic error led the agents to misdiagnose the cause and leave authorized cleanup unfinished.
Private paths, repository names, session IDs, and raw logs are omitted.
Prepared with OpenAI Codex, GPT-6 Astra, during T3 Code triage.
bog-margo commentedon Oct 27, 2026
Additional confirmed Windows desktop occurrence on 2026-10-27, posted at the owner's explicit request.
Verified environment
OpenAI.Codex 26.1021.3705.0.sandbox_mode=danger-full-access,approval_policy=never, revieweruser.Observed failure
The owner explicitly requested removal of four agent-created temporary test directories inside the current workspace, then explicitly requested deletion again after the first denial. Read-only checks confirmed their exact absolute paths, workspace containment, directory type, and absence of reparse points on the directory roots.
Both a guarded cleanup script and a standalone literal-path command were rejected before PowerShell started. Sanitized command shape:
The only explanation was
CreateProcess ... rejected: blocked by policy. No actionable rule identifier or approval path was exposed. The directories remain.User rules contained 132 allow rules and no prompt/forbidden rules. A non-executing
codex execpolicy checkreturned{"matchedRules":[]}. Inspected AGENTS.md files contained no prohibition on this cleanup. These checks do not establish the hidden winning predicate.The published forced-delete heuristic and dangerous-command
Never -> Forbiddenbranch are consistent with this failure, but no runtime classifier trace was available. The assistant initially misattributed the rejection to Auto-review; that explanation was corrected.Please expose the actual matched condition and the approval-policy conflict, clarify this limitation in Full Access, and provide a supported exact-action approval route. Repeated textual authorization currently leaves an opaque dead end and wastes substantial diagnostic time.
No private paths, project contents, credentials, account/session identifiers, or raw logs are included. No alternate deletion executor or changed safety setting was used to complete the denied cleanup.
HaggisSupper commentedon Oct 29, 2026
Additional Windows desktop evidence with bundled
codex-cli 0.165.0-alpha.1.2.An explicitly authorized temporary-file cleanup containing PowerShell
Remove-Item ... -Forcewas rejected before process creation withCreateProcess ... rejected: blocked by policy. The affected task's saved settings and runtime diagnostic tags recordedapproval_policy=neverandDangerFullAccess.Read-only investigation:
codex execpolicy check. Both the separate PATH CLI (0.165.0) and desktop-bundled CLI returned{"matchedRules":[]}against the inspected user rule file. The PATH CLI's--resolve-host-executablesvariant also found no match. These static checks do not reproduce the complete runtime safety decision.app-server --print-startup-configdiagnostic succeeded and reportedconfigRequirements.requirements=null. This fresh startup diagnostic does not reconstruct all historical policy inputs of the existing desktop process.Remove-Item -LiteralPath <nonexistent-workspace-file> -Force -WhatIf -ErrorAction Stopwas rejected before PowerShell started with the same generic message. No probe file was created or deleted.The published source matching the bundled version supports the explanation: the Windows classifier treats a delete cmdlet combined with
-Forceas dangerous; the runtime fallback maps that classification to Forbidden under Never and Prompt under OnRequest; the Other rejection category renders onlyblocked by policy.This is a source-backed diagnosis corroborated by the non-mutating probe, not a directly logged classifier decision from the original denial. No evidence established an automatic-reviewer rejection. Cleanup did not execute; no alternate deletion mechanism, allow rule, or security-setting change was used. An approval-mode recovery was not tested.
Expected behavior / suggested acceptance criteria:
-Force -WhatIfcase and distinguish static rule-check output from full runtime authorization.Impact: authorized remote cleanup remains blocked, and the opaque error sends investigation toward unrelated rules or configuration. This report requests actionable diagnostics and review, not removal of safeguards. No private paths, account details, thread identifiers, file contents, or raw logs are included.
sylviema2002 commentedon Oct 30, 2026
Additional Windows desktop occurrence on 2026-10-30, reported at the affected user's explicit request. Personal paths and account details are omitted.
sandbox_mode=danger-full-access,approval_policy=never, unrestricted filesystem profile.Remove-Item -Recurse -Forcewas rejected before process creation. A second, narrower command deleting only one literal-path Temp file usingRemove-Item -LiteralPath '<user Temp>\\<old updater>' -Force -ErrorAction Stopwas also rejected before process creation withexec_command failed: CreateProcess ... rejected: blocked by policy. No files were deleted.Could a maintainer confirm whether this specific forced-delete rejection is the expected Windows dangerous-command classifier +
Never -> Forbiddenbehavior, rather than another policy layer? What is the supported user-reviewed path in the desktop app to authorize a bounded, exact-path cleanup without disabling safety checks? Please expose the matched condition in the tool error.kuziapkgpt1-hash commentedon Nov 5, 2026
Confirmed a similar Windows cleanup case: Full Access with approvals set to never returned CreateProcess rejected: blocked by policy for user-authorized Remove-Item -Recurse -Force. After the user switched to the approval mode, separately approved commands ran: one Unity test project and four APKs were removed. Two other batches started but stopped on DirectoryNotFoundException for deeply nested Unity build paths; some folders remain. This supports the approval-mode recovery for those commands, not a complete cleanup or proof of the exact rejecting rule. The remaining long-path error is a separate Windows filesystem issue.
IM-DaXiong commentedon Nov 8, 2026
Windows cleanup report — 2026-11-08
Adding a user-authorized report and asking for the supported recovery path.
OpenAI.Codex 26.1103.4239.0(read from Get-AppxPackage).sandbox_mode = danger-full-access,approval_policy = never.Remove-Item -LiteralPath <exact-cache-directory> -Recurse -Force -ErrorAction Stop, with containment and reparse-point guards in the submitted script.exec_commandrejected process creation immediately:CreateProcess ... rejected: blocked by policy. The guards inside that rejected command did not execute, and this request deleted nothing. No matched rule, reviewer verdict, or approval control was returned.The published Windows forced-delete classifier and the dangerous-command
Never -> Forbiddenbranch appear consistent with the observation, but we have no runtime trace establishing the actual matched rule. Calling the error an Auto-review verdict would therefore overstate what is known.Could maintainers confirm:
blocked by policymessage?No private paths, repository identity, credentials, user files, raw logs, or chat transcript are attached. No alternative deletion executor or permission-setting change was used after rejection. Submitted with AI assistance at the owner's explicit request.
mapmap5214 commentedon Nov 9, 2026
Additional Windows desktop occurrence on 2026-11-09, submitted at the affected user's explicit request.
Environment and failure
codex.exereports0.167.0-alpha.3.2. The desktop package version and the exact build of every executor component were not independently collected.approval_policy=never,sandbox_mode=danger-full-access, revieweruser.Remove-Item -LiteralPath ... -Recurse -Forcewere rejected before process creation, ending inrejected: blocked by policy. No matching condition, actionable rationale, or review route was returned.Observed recovery
The user then changed the chat to Approve for me. The supplied execution context changed to
workspace-writewith reviewerauto_review. After fresh read-only checks, native PowerShell cleanup naming the same four exact targets succeeded with exit code 0. All four directories were confirmed absent, while the release archives' hashes remained unchanged.This was the same cleanup operation and target set, but not a byte-for-byte identical command A/B test: the successful request used a direct literal-path deletion rather than the earlier guarded loop. No separate reviewer verdict was returned to the agent. Therefore this confirms a recovery in this case, not that the mode change alone explains every rejection.
Version-tagged source consistent with the behavior
The published
rust-v0.167.0-alpha.3.2source still:-Forceas dangerous, including an explicitRemove-Item ... -Recurse -Forcetest:https://github.com/openai/codex/blob/rust-v0.167.0-alpha.3.2/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs
DangerousCommandMatch::Other:https://github.com/openai/codex/blob/rust-v0.167.0-alpha.3.2/codex-rs/shell-command/src/command_safety/is_dangerous_command.rs
NevertoForbidden, and renders theOthercategory as onlyblocked by policy:https://github.com/openai/codex/blob/rust-v0.167.0-alpha.3.2/codex-rs/core/src/exec_policy.rs
This is source-backed consistency, not a runtime trace proving the original classifier branch.
Requested improvement
Please expose the actual command-safety category and explain the conflict with non-interactive approvals, clarify the Full access wording, and provide a supported exact-action review path where policy permits. Switching to Approve for me resolved this user's cleanup, but the original generic error did not make that path discoverable.
The report does not request removal of safeguards. No private paths, project identity/content, credentials, account or chat identifiers, raw logs, or transcript are included. No alternate deletion executor was used to bypass the denial.
ScottBeeson commentedon Nov 12, 2026
Additional Windows desktop occurrence, posted at the affected user's explicit request.
Observed environment
functions.exec → tools.exec_command, launching the bundled PowerShell.sandbox_mode=danger-full-access,approval_policy=never, filesystem permission profile disabled/unrestricted.OpenAI.CodexPrimaryRuntime.v26-1104-2876-0_26.1104.2876.0_x64. This is the runtime package observed in the error, not a verified desktop About or Codex CLI version.Authorized task and separate checks
The user explicitly asked to retry deleting two unnecessary, agent-created test directories and capture why deletion was blocked. Separate read-only commands verified:
Complete submitted PowerShell command, with only the private project path replaced and line breaks added
This is the observed compound command, not an independently tested minimal reproduction:
Result
The tool failed immediately, before PowerShell execution:
That block is an excerpt, not the full response. The returned error itself contained the literal marker
…814 chars truncated…inside the echoed command. No untruncated underlying error, matched rule, policy identifier, or supported recovery action was exposed. Therefore the PowerShell catch block could not collect any Windows exception.Subsequent read-only inspection confirmed both directories remained, with identical file counts and byte totals. No alternative executor or deletion mechanism was used.
The assistant initially called this an “automatic approval review” rejection. That attribution was unsupported by the returned error and should not be treated as a diagnosis. The command shape and settings match this issue, but the exact runtime decision path for this occurrence has not been established.
Please expose the specific denial reason/rule and a supported way to complete bounded, explicitly authorized cleanup. Please also make the complete rejection diagnostic retrievable: truncating the only error leaves both user and agent unable to inspect it. Private project names, tenant/account identifiers, credentials, and raw session transcripts are omitted.
ScottBeeson commentedon Nov 12, 2026
Follow-up to our earlier report: both temporary directories have now been successfully deleted, with their absence verified. Posting this update at the user's request.
Observed sequence, using the same
exec_commandtool and PowerShell executor:temp-native-check-buildandtemp-ui-local-01within the original artifact directory. File counts and byte totals were unchanged.Remove-Item -LiteralPath ... -Recurse -Force -ErrorAction Stop. It was again rejected before process creation withblocked by policy. This shorter error was not truncated, but still supplied no specific rule or rationale. Temp-prefixed names alone did not resolve the failure.artifactsinto the repository'stempdirectory, as requested by the user. Verified source paths were absent and destination file counts/byte totals were unchanged.-Force(only the private project path is anonymized):It returned exit code 0. Separate
Test-Path -LiteralPathchecks verified both directories were absent.Effective turn settings remained
sandbox_mode=danger-full-accessandapproval_policy=never. No permission-mode change, alternate executor, or security-policy change was used.Evidence limit: both the directory location and the removal flags changed between the final rejected and successful attempts. This was not a controlled single-variable comparison, so it does not independently establish whether omitting
-Force, moving the directories, or another factor caused success. It is consistent with the force-delete classifier evidence discussed in this issue, but the actual denial still exposed no matched rule.The cleanup is complete for this occurrence. The remaining product concern is the opaque denial: a specific reason and supported narrower alternative would have avoided repeated retries and user intervention.
ScottBeeson commentedon Nov 12, 2026
Controlled follow-up to the earlier comparison: the user requested a test at the original directory names and original location under artifacts. This removes the location confound from that comparison.
EPHEMERAL-REMOVABLE-TEST.txtfile each (111 bytes per file). These were new disposable fixtures, not restored user data.exec_command failed: CreateProcess ... rejected: blocked by policy.-Forceremoved:The tool, PowerShell executor, paths, fixture contents, and effective
danger-full-access/approval_policy=neversettings were unchanged between attempts. No alternate executor or permission change was used.This controlled test isolates
-Forceas the rejection trigger for this command, not the artifacts folder or original directory names. It supports the classifier behavior described in this issue. The error still did not expose the matched internal rule or explain that the narrower deletion could succeed. All test fixtures were cleaned up.henriSandovalSilva commentedon Nov 20, 2026
I ran into this during routine cleanup on Windows. With Full access and approval_policy = never, Codex tried to remove a directory of test artifacts using Remove-Item -LiteralPath with -Recurse -Force. The tool returned "blocked by policy" before PowerShell started.
The practical cost was the diagnosis. Codex suggested changing my approval settings or deleting the folder myself in Explorer. In the same session, it later checked the path separately and ran the deletion without -Force. That succeeded, and we verified the directory was gone. Both the flag and the command structure changed between attempts.
Could the tool say which part of the command triggered the decision and what the agent can do next? If forced deletion is what triggered it, a hint that ordinary deletion may be sufficient would have saved several rounds of troubleshooting.
dominikkociecki commentedon Nov 26, 2026
Additional Windows Desktop occurrences, posted at the owner's request after reviewing local tool-call records from the past month.
We confirmed five cleanup rejections in four separate conversations:
All five used PowerShell Remove-Item with -LiteralPath, -Recurse and -Force. The recorded effective turn settings were approval_policy=never and sandbox_policy=danger-full-access. The tool returned a CreateProcess rejection ending in "blocked by policy", before the rejected PowerShell command started. Checks embedded in those commands therefore did not run; we do not present them as completed preflight validation. The November 26 error also truncated the echoed command.
The latest occurrence invoked PowerShell from runtime package 26.1123.915.0; the earlier selected occurrences invoked it from 26.1119.907.0. These are package identifiers, not independently verified CLI engine versions at the moment of rejection.
The impact is recurring unfinished cleanup and extra user intervention. Some assistant messages called the failure an automatic-review rejection, but the returned error does not establish that attribution or identify the matched rule.
This matches the symptom discussed here, but we cannot establish that every occurrence has the same internal cause, or that it was introduced by the latest update. No cleanup or permission change was attempted during this investigation.
Please provide the matched safety condition and an actionable, scoped approval route. Is switching the affected chat to an approval-enabled mode the supported recovery for this case?
No filenames, directory names, locations, project names, account/session identifiers, file contents or raw logs are included.