Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
OpenAI.Codex 26.715.7063.0
Bundled/local CLI observed in the same environment: codex-cli 0.145.0-alpha.20.
What subscription do you have?
ChatGPT Pro (20x)
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
Windows 11 Pro, build 26200
PowerShell 7.6.3
What issue are you seeing?
Codex App rejected an explicitly authorized, path-bounded cleanup of local
Git-ignored cache directories before the PowerShell process started.
The task was running with:
sandbox_mode: danger-full-access
approval_policy: never
filesystem profile: unrestricted
workspace: an explicitly selected local workspace owned by the operator
Before attempting deletion, the agent created a pre-delete manifest and
validated nine exact directories across two registered Git worktrees:
- basenames were exactly
__pycache__or.pytest_cache; - every resolved target remained below its explicitly named worktree root;
- all nine paths were confirmed by
git check-ignore; git ls-filesfound zero tracked members in every target;- protected path segments (
.git,.runtime,.loci,tmp,sandbox) were
rejected; - no other process command line referenced any exact target;
- aggregate scope was 9 directories, 191 files, 8,819,141 bytes;
- rollback was regeneration through normal compilation or tests.
Only after those checks, the command would have called:
Remove-Item -LiteralPath $resolvedExactTarget -Recurse -Force -ErrorAction StopThe tool wrapper rejected the entire command before execution:
rejected: blocked by policy
wall time: 0.0 seconds
No target was deleted and no shell-side validation ran. The response contained
no rule ID, matched risk feature, approval path, or indication of whether the
block came from recursive deletion, multiple exact paths, PowerShell syntax,
dynamic-but-resolved targets, or another policy layer.
I agree that Codex must block unresolved variables, workspace roots, user-profile
roots, drive roots, and broad destructive commands. This report is about the
opposite failure mode: a fully evidenced, operator-authorized, recoverable local
cleanup cannot proceed or request a narrower one-time authorization.
What steps can reproduce the bug?
Observed once in Codex App on Windows. I did not retry or reshape the rejected
command because the repository policy requires stopping after a host-policy
denial.
A safe disposable-repository reproduction would be:
- Create a temporary Git repository containing
.gitignorewith
.pytest_cache/and__pycache__/entries. - Create one ignored cache directory with a disposable file.
- Run Codex App locally with
sandbox_mode = "danger-full-access"and
approval_policy = "never". - Explicitly ask Codex to delete only that exact ignored and untracked cache
directory. - Require Codex to resolve the canonical path, prove containment, run
git check-ignore, prove zero tracked members, and materialize a rollback
receipt before deletion. - Observe whether the command is rejected before PowerShell starts with the
generic messageblocked by policy.
The actual observation used nine targets, but the minimal one-target case
has not yet been run because retrying after denial was intentionally avoided.
What is the expected behavior?
Codex should preserve strong protection against broad or unresolved recursive
deletion while providing one of these outcomes for a fully bounded local action:
- Allow the operation when the operator explicitly authorizes exact canonical
paths inside the selected writable workspace and the agent proves that the
targets are ignored and untracked. - Surface a one-time, exact-path approval that cannot widen to parent paths,
sibling paths, workspace roots, user-profile roots, or drive roots. - Offer a recoverable deletion primitive (Recycle Bin/trash) with a manifest
and restoration receipt. - If denial remains mandatory, return a stable policy/rule identifier and the
matched risk characteristic so the action can be safely redesigned or a
false positive can be reported without guessing.
approval_policy = "never" should not turn an otherwise approvable local
operation into a generic, non-actionable failure. A documented exact-path grant
or recoverable-delete mechanism would keep the safety boundary while preserving
operator control over their own workspace.
Additional information
- Existing-issue search found reports of destructive deletion being too
permissive, including Windows PowerShell$homecollision let a read-only subagent recursively delete%USERPROFILE%#32684. Those incidents justify strong recursive-delete
protection. This report asks for a narrow safe path that does not weaken those
protections. - No matching open issue was found for this exact false-positive shape using
searches forexecpolicy false positive Windows,blocked by policy false positive,approval never command rejected, andRemove-Item Recurse Force blocked. - No credentials, customer data, private file contents, complete session logs,
usernames, or real absolute workspace paths are included in this public
report. - A sanitized pre-delete manifest and the full local tool rejection can be
provided privately to maintainers if requested.
Activity
github-actions commentedon Jul 20, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
aidawilliam41-ops commentedon Aug 7, 2026
Additional confirmed occurrence after bounded migration cleanup
On Windows, an exact cleanup of three task-owned migration/rollback directories was rejected before execution even after the cleanup set had been fully bounded.
Confirmed preflight:
00The first exact
Remove-Item -LiteralPathoperation was rejected before execution with:No partial deletion occurred. The residual set was three directories containing 41 files and 3,829,710 bytes.
Expected: allow package-approved exact-path recursive cleanup after containment, reparse-point, and writer preflight, or return the specific failing condition and an exact supported cleanup route.
Actual impact: a verified migration could not complete its required cleanup automatically, leaving the owner to remove the bounded temporary artifacts manually.
ZXJ0904ly commentedon Aug 16, 2026
I can reproduce the same behavior in a newer Windows Codex Desktop environment.
Observed setup (sanitized)
26.810.52044sandbox_mode = "danger-full-access"elevatedObserved result
A read-only preflight (
Get-Item -LiteralPath ...) succeeded and confirmed that the target was a single file. The subsequent PowerShell deletion command usingRemove-Item -LiteralPath ... -Forcewas rejected by the tool wrapper before PowerShell started, with:The same behavior also occurred when attempting to clean a small, explicitly enumerated set of Codex cache/log/archive paths. No raw local paths, file names, credentials, or file contents are included here.
Could maintainers clarify whether this is an intentional protected-path rule (for example, targets outside the selected workspace or below the user profile), or the same false-positive policy block described in this issue? Is there a supported Desktop-App workflow for a one-time, exact-path, user-approved deletion without bypassing safety controls?
Thank you.
cis-aconiticacid commentedon Aug 26, 2026
Need to be fixed. Urgent
LuluaneS commentedon Aug 31, 2026
Still occurring in Codex Desktop 26.825.6671.0 on Windows (2026-08-30)
Another confirmed recurrence: explicitly authorized cleanup of temporary test/deployment packages inside the selected workspace is rejected before PowerShell starts. The owner has encountered this repeatedly and must finish cleanup manually.
Environment observed in the affected session
OpenAI.Codex 26.825.6671.0.10.0.26200; PowerShell7.6.4(pwsh.exe).sandbox_mode = "danger-full-access",approval_policy = "never", and unrestricted filesystem access.exec_command.Latest observed case
The user explicitly requested removal of two completed temporary build/acceptance directories. Before the attempt, the agent verified that both exact absolute paths were children of the selected workspace, with no reparse points; no references to either directory were found among the inspected process command lines. The necessary source code and regression tests were already retained in the canonical project, and the acceptance reports had been made self-contained. The deletion scope was two directories, 244 files, approximately 5.1 MiB.
The rejected command had this shape (only the paths have been anonymized):
The execution tool returned a
CreateProcessrejection ending in:The command did not start. No rule identifier, matched condition, or actionable explanation was returned. A previous explicitly authorized removal of a temporary rollback copy had been blocked the same way during this project.
The agent stopped after the denial and did not retry through another shell, API, or broader deletion command. The user subsequently deleted the two directories manually; a read-only check confirmed both original paths absent and the canonical source/tests still present. This is an execution-tool rejection, not an observed PowerShell filesystem-permission error.
A limited read-only inspection found no explicit
prompt/forbiddendecisions in the user-leveldefault.rulesfile and no project/parent.codex/rulesdirectory. This does not establish which effective policy applied or exclude platform/managed policies. We do not yet know whether this is an intentional restriction or a false positive.Could maintainers clarify:
Temporary files and finished test packages are routine development output. Requiring manual deletion after repeated opaque denials interrupts otherwise completed work. Please preserve protections against broad destructive operations while providing an actionable path for explicitly authorized, bounded cleanup.
This is a report of the observed session, not a claim that the anonymized example has been reproduced in a fresh minimal workspace. No private paths, file contents, credentials, or raw session logs are included.
Diagnostics collected by Astrean-Codex; posted with the account owner's explicit authorization.
KotMatrosk1n commentedon Sep 6, 2026
Additional occurrence on Windows, 2026-09-06: rejection with
approvals_reviewer = "user"A similar pre-execution cleanup rejection occurred in Codex Desktop. The affected session metadata records bundled CLI version
0.153.4. The installed desktop package checked during the investigation isOpenAI.Codex 26.901.6511.0(not independently captured at the instant of rejection).The effective context of the affected turn, rather than just the current config file, records:
Runtime log entries around the rejection also report
approval_policy=Neverandsandbox_policy=DangerFullAccess.The agent attempted routine cleanup after implementation and validation: one temporary video-tool directory, a contact-sheet image, and extracted PPM images beneath the selected workspace's scratch directory. This was agent-initiated task cleanup; this report does not claim that the operator separately approved each deletion target.
The submitted command resolved the workspace and tool-directory paths, compared the tool directory against the expected child path, then used
Remove-Item -LiteralPath $videoTools -Recurse -Force. It also included deletion of the exact contact-sheet path and aGet-ChildItem -Filter '*.ppm'pipeline deleting the returned files in one specific evidence directory. These path checks were inside the rejected command, so they did not execute as part of that call.The tool returned a
CreateProcessrejection ending in:No PowerShell process started. The task recorded approximately 90 MB of temporary artifacts remaining. Implementation changes were unaffected. No alternate deletion route was attempted during the investigation.
The assistant described this to the user as an "automatic approval review" rejection, but the available error contains only the generic policy message and the turn's reviewer setting was
user. The evidence does not establish that an automatic reviewer made this decision. This adds a diagnostic/attribution problem to the cleanup failure.A read-only check found no explicit
promptorforbiddendecisions in the inspected user-level rules. That does not exclude other effective policies. A clean-workspace reproduction has not been attempted, and the exact denying policy remains unknown.Could maintainers identify which layer can reject this operation under these effective settings, expose a specific reason/rule identifier, and document the supported resolution? If the denial is intentional, please distinguish it from automatic-review decisions so the assistant can explain it accurately.
This report intentionally omits usernames, absolute local paths, project contents, session identifiers, and raw logs. Posted with the user's authorization.
PrzemyslawKlys commentedon Sep 8, 2026
Additional occurrence on Windows, 2026-09-08: also rejected without
-ForceExplicitly authorized cleanup of disposable benchmark/test/build artifacts was rejected before PowerShell started. After the initial rejections, the operator explicitly asked the agent to use the cleanup guidance and retry without
-Force. That safer form was also rejected.Environment checked during this investigation
OpenAI.Codex 26.901.6511.0. A beta package is also installed; the active process package/version was not independently resolved, so this is an installed-version observation.10.0.26200.0; execution shell: PowerShell7.6.5(pwsh.exe).sandbox_mode = "danger-full-access",approval_policy = "never", filesystem unrestricted, permission profile disabled.[windows] sandbox = "elevated".gpt-6-astra, reasoning efforthigh.exec_commandthrough the desktop tool interface. Bundled CLI version was not established.Scope
The recorded cleanup set contained 113 task-owned targets, approximately 1.68 GiB: 34 build directories, 61 other temporary artifact targets, 14 CSV output directories, and 4 trace files. These were inside a dedicated Git worktree created for the task, a sibling of the primary checkout beneath the repository root. The primary checkout was the selected workspace; the task worktree was outside that explicitly listed workspace root, although this session reported unrestricted filesystem access. This distinction may matter to diagnosis.
Committed source and the retained evidence directory were to be preserved. Existing task records established the generated-artifact inventory. The latest command additionally contained checks for absolute-path containment, exclusion of retained evidence, reparse points in targets/ancestors/contents, and tracked content using
git ls-files.Commands attempted
Earlier cleanup batches used:
Following the operator's explicit correction, the latest combined command read the recorded target manifest, constructed a verified-path list, and ended with:
There was no
-Forceon deletion in that retry.Get-Item/Get-ChildItemused-Forceonly for inspection of hidden items.Observed result and limits
Both forms were rejected by the execution wrapper with a
CreateProcesserror ending in:The latest tool call reported
Wall time 0.0 seconds. The entire command was rejected before execution, so the checks embedded in that command did not run either. Separate read-only commands succeeded afterward and confirmed that all 113 recorded targets remained and the Git working tree was clean.We have not tested a standalone deletion of one literal directory, a fresh minimal reproduction, or a target inside the primary selected workspace. This report does not claim that all deletion forms fail. No alternate shell, encoded command, or alternate deletion API was used to get around the rejection.
The assistant initially called this an "automatic approval review" rejection, but the error does not identify that layer. The actual denying rule/component remains unknown. We received no rule identifier, matched condition, or actionable approval route.
Could maintainers clarify what rejects this bounded cleanup under these settings, whether the dedicated worktree location or combined PowerShell command matters, and the supported resolution? The generic rejection has repeatedly interrupted completion of otherwise finished work.
Posted with the operator's explicit authorization. Private usernames, absolute paths, project details, file contents, and raw session logs are omitted.
Follow-up: narrower native PowerShell commands succeeded
Later in the same session, a separate read-only command verified one exact task-owned build directory (containment, no tracked members, no linked target/ancestors/content). A standalone
Remove-Item -LiteralPath '<absolute verified directory>' -Recurse -ErrorAction Stopthen succeeded, without-Forceon deletion. The same pattern subsequently removed all 113 recorded targets; a separate final check confirmed zero remaining targets, approximately 1.68 GiB reclaimed, and a clean Git working tree. Source and retained evidence were preserved.No alternate shell, .NET deletion API, or policy change was needed. This narrows the observed failure: the combined verification/manifest/loop/deletion command was rejected, while separate preflight plus individual literal-path native deletions was accepted. It does not identify the exact matching rule, but it demonstrates that the earlier rejection did not mean all authorized cleanup was unavailable. The agent's earlier blanket conclusion was too broad.
subinraju1995-maker commentedon Sep 8, 2026
Additional Windows desktop occurrence: exact task-owned cleanup rejected before spawn; feedback correlation supplied
Posted with the operator's explicit authorization. Adding this bounded occurrence to the existing matching issue instead of opening a duplicate.
Observed at / report generated at: Toronto
2026-09-08T08:29:18-04:00[America/Toronto]; UTC2026-09-08T12:29:18Z.Correlation
01a03bce-66d1-7a20-aa16-9d24d974654c.call_0zF3u12YVCj1rF0oMP6pZXlY;functions.execinvokingtools.exec_command.2026-09-08T03:15:02.045Z; rejection:2026-09-08T03:15:02.131Z.Relevant environment
sandbox_mode=danger-full-access,approval_policy=never, unrestricted filesystem/disabled permission profile.OpenAI.Codex 26.901.5280.0, Windows10.0.26200.0, execution shell PowerShell7.6.5. The incident-time active app package, Windows and shell versions, and bundled CLI version were not independently captured.Rejected operation (sanitized structural description, not an executed reproduction)
The complete local call contained 5,194 characters of PowerShell, used
workdir=<explicit project root>,yield_time_ms=10000,max_output_tokens=2200, and no escalation/approval override. It combined fail-closed ownership/containment/process/port/hash checks with cleanup of exactly two generated directories and one stale lock file beneath that project. It never targeted the workspace root.The operation-bearing statements used:
Remove-Item -LiteralPath $exactLink -Force -ErrorAction Stopfor 25 enumerated package SymbolicLink entries.Remove-Item -LiteralPath '<exact generated child directory>' -Recurse -Force -ErrorAction Stopfor each of two literal directories, after link checks.Remove-Item -LiteralPath '<exact stale lock file>' -Force -ErrorAction Stopafter rechecking its identity/hash.Separate read-only checks before the historical call established ownership, canonical containment, no related live owner/listener, and contained link targets. Those checks are historical, not current process evidence. The checks inside the rejected command never ran. Post-rejection checks confirmed all three targets remained; no deletion occurred.
Available error
The ellipsis above is an intentional public redaction of the echoed local command. The retained returned envelope also already contained its own
…5309 chars truncated…marker in that echo; the full invocation is retained locally separately. The only returned reason is exactlyblocked by policy. No additional rationale is being omitted or reconstructed.Requested supported resolution
Please use the feedback/call/timestamps to identify the enforcing component and exact condition. Is this an intended restriction or a false positive? What supported, narrowly scoped clearance or host-authorized cleanup procedure applies without weakening global controls? Please clarify whether command composition/workspace registration matters and who can legitimately authorize the remedy.
Other commenters' successful narrower command forms are not treated as clearance for this denied call. No alternate deletion API, shell, encoded command, policy modification, replacement work root or new cleanup retry was used for this escalation. The local acceptance run remains blocked until legitimate clearance and fresh ownership/link/process verification.
No private application source, real local paths, credentials, customer data, environment dump or full session transcript is included.
staminaoo commentedon Sep 9, 2026
Additional Windows desktop observation: command-form difference and Full Access preset interaction
Posted with the account owner's explicit authorization.
Environment and scope
OpenAI.Codex 26.903.8094.0, Windows. The bundled rejecting backend's exact version was not independently established.danger-full-access,approval_policy=never.Observed attempts
A compound PowerShell invocation containing validation, the following deletion, and a subsequent catalogue update was rejected before PowerShell started:
The only reason returned was
rejected: blocked by policy, with zero execution time. No rule identifier was supplied.The user then explicitly requested an attempt without
-Force. After a separate preflight, this standalone invocation was accepted and executed:PowerShell exited 1: “You do not have sufficient access rights to perform this operation or the item is hidden, system, or read only.” The directory remained; a hidden
.gitdirectory was observed. The precise filesystem item causing that error was not established.These are not a controlled, single-variable A/B test: command composition and variable-versus-literal path form also changed. They establish that the second form passed command review, not that every deletion is blocked or that removing
-Forcecompletes cleanup.Preset/configuration observation
The Settings UI and top-level user config both specified
on-requestwithdanger-full-access, while desktop state selected thefull-accessagent-mode preset. Old and newly created tasks both recordednever.Read-only inspection and isolated, in-memory evaluation of the installed frontend's permission-construction functions showed:
on-requeston-requeston-requestneverThe preset calls the constructor without the configured approval value; its default and explicit preset mapping are
never. This appears to be preset behavior rather than a constructor misreading its argument.The current public Windows classifier includes a same-segment delete-command +
-Forceheuristic. The public execution policy can convert a dangerous-command classification into rejection undernever. This is consistent with the observation, but is not an installed-backend rule trace.Requested improvement
Please expose the actual matched rule and resolved permission source, and document a supported, narrowly scoped way to finish explicitly authorized cleanup of an exact disposable clone, including hidden Git metadata. An exact-path grant or recoverable-delete operation would help. The UI should also make clear when the selected Full Access preset overrides the separate approval setting.
No application patch, policy modification, alternate deletion API, or further force-deletion attempt was performed. Private paths, credentials, message data, and raw session logs are omitted.
p-romeo commentedon Sep 9, 2026
Additional reproduction on Windows during explicitly authorized application cleanup.
Feedback ID:
01a08611-002d-79d2-90bb-40673627c57dFeedback submitted through the Windows app on September 9, 2026.
Environment
26.901.6511.0(queried withGet-AppxPackage)codex-cli 0.153.426200.91687.6.5danger-full-access, approval policynever, and unrestricted filesystem accessObserved behavior
I explicitly requested uninstalling Agent Orchestrator and removing its worktrees. All eight worktrees were successfully removed through Git, and the application’s registered uninstaller exited with code 0.
Deletion of these two remaining application-data directories was then rejected:
The script checked each resolved absolute path against its expected target and rejected reparse-point targets before attempting:
The tool returned a
CreateProcessrejection ending in:Renewed explicit user permission did not change the result. Running the same loop and path validation without the deletion statement succeeded for both directories. No alternate deletion method was attempted after denial.
This is an observed failure, not a standalone deterministic reproduction. The underlying policy rule is unknown.
Could maintainers identify the rule from the submitted feedback, clarify whether this denial is intended under Full Access, and provide a supported resolution or actionable rejection message?
Related: #38886 and #43732.
p-romeo commentedon Sep 9, 2026
Follow-up on my report above (September 9, 2026): switching from GPT-6 Astra to GPT-5.3 Codex Spark in the same task resulted in successful cleanup within the next turn. I have now switched back to Astra.
The behavior difference is notable: Astra stopped after the execution tool returned
rejected: blocked by policyand would not proceed through an alternate deletion route. Spark proceeded withcmd /c rmdir /S /Qusing explicit paths. The tool calls exited 0, and subsequentTest-Pathchecks confirmed that both original application-data directories and the two disposable diagnostic directories were absent.This corrects the current status of my earlier report: cleanup is now complete, and an alternate deletion method was subsequently used. The earlier statement that no alternate method had been attempted was accurate at the time of posting.
Important diagnostic limit: both the selected model and the command form changed. This was not an identical-command A/B test and does not establish that the backend policy itself differs by model. It does demonstrate different agent behavior following the same earlier denial. Please investigate the interaction between model behavior, command classification, and the generic rejection, and clarify the intended supported behavior after such a denial.
Same feedback ID:
01a08611-002d-79d2-90bb-40673627c57d. Successful cleanup occurred at approximately 08:44 EDT / 12:44 UTC on September 9. No policy/configuration change was made during the successful cleanup turn.p-romeo commentedon Sep 9, 2026
Follow-up to my earlier report: the same PowerShell validation loop and Remove-Item -LiteralPath ... -Recurse -Force command subsequently succeeded on GPT-6 Astra after the approval configuration changed. The target was a disposable workspace folder containing a test file; deletion exited 0 and a separate check confirmed the folder was absent.
Observed configurations and results:
Both approval policy and reviewer changed in the successful transition, so this does not isolate the reviewer alone. This is stronger evidence than the earlier Astra/Spark comparison, where the command also changed. The earlier suggestion that Astra could not perform the deletion was too broad.
The public rust-v0.153.4 source classifies a deletion cmdlet plus -Force in the same parsed segment as dangerous, and the execution policy can convert that classification to Forbidden under Never:
https://github.com/openai/codex/blob/rust-v0.153.4/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs
https://github.com/openai/codex/blob/rust-v0.153.4/codex-rs/core/src/exec_policy.rs
Please clarify the UI mapping to these effective approval settings and expose an actionable reason when approval is required but disabled. These observations do not identify a separate internal automatic-review decision. No raw logs, session/call identifiers, local paths, or file contents are included in this update.
AntaresGG commentedon Sep 12, 2026
Additional controlled CLI reproduction:
-Forcetriggers static execpolicy rejection underneverThis adds a same-path A/B reproduction on CLI 0.154.0 to the existing discussion. It supports the static execution-policy explanation in #34331 (comment); it is not evidence of a model reviewer denying the action.
Observed environment
codex-cli 0.154.0(npm installation).gpt-6-astra.approval_policy = "never",approvals_reviewer = "user",sandbox_policy.type = "danger-full-access".Controlled observation on September 12, 2026
Created a new disposable directory under the user's temporary directory containing one nested directory and one ordinary text file. Verified its absolute path and absence of reparse points in the target, ancestors, and descendants.
Sent the following standalone command through
exec_command, usingshell = "pwsh.exe". It exited 0, and a separate check confirmed that the directory was absent.Recreated the same directory and content at the same absolute path and repeated the checks.
Sent the same shell command with only
-Forceadded:The tool returned a pre-execution
CreateProcessrejection ending inrejected: blocked by policy. It produced no shell exit code. The directory remained present. The paths above are redacted equivalents of the observed commands, not literal runnable paths.The experiment used ordinary files, so
-Forcewas unnecessary. No approval or sandbox configuration was changed. This is one controlled comparison, not a claim about everyblocked by policyreport.Version-matched source explanation
Source: release
rust-v0.154.0, commit6b9826e3aa83b1a5947db50f4332cb9c65f1b340.has_force_delete_cmdletdetects a deletion cmdlet and-Forcein the same command segment. Its tests explicitly coverRemove-Item ... -Forceand unforced removal.dangerous_powershell_words_matchmaps this toDangerousCommandMatch::Other.render_decision_for_unmatched_command_for_platformreturnsForbiddenfor a dangerous command underAskForApproval::Never.dangerous_command_rejection_reasonmapsOtherto the genericblocked by policytext.Forbiddenbranch returns immediately; it does not request model approval for this branch.The inspected reproduction rollout contains no Guardian assessment event. Local logs did not provide a classifier trace, so the diagnosis combines the controlled behavior, effective settings, and matching release source; it is not a captured runtime stack trace.
Requested improvement
Please expose the matched classifier and effective approval-policy conflict in this error, for example:
PowerShell forced-delete heuristic requires approval, but approval_policy=never. Distinguish this from model-review denial, explicit rules, and filesystem errors. Please also document a supported path for explicitly authorized, narrowly scoped cleanup under Full Access.No raw logs, account identifiers, private repository names, local usernames, or session identifiers are included. This report does not request weakening the forced-deletion safeguard or claim that a model reviewer was invoked.
RoboCoder68 commentedon Sep 12, 2026
Additional confirmed Windows desktop occurrence on September 12, 2026
An explicitly requested retirement of one local project directory was blocked before PowerShell started. The failure remained after reducing the command to one literal absolute path and a single native PowerShell operation.
Sanitized equivalent of the exact standalone command (only the path is replaced):
The original tool result was a
CreateProcessrejection ending inrejected: blocked by policy, with a reported wall time of 0.0 seconds. There was no shell exit code or actionable rule explanation.CreateProcessdescribes the attempted launch of the PowerShell wrapper; this command contained noStart-Process, background launcher, URL, wildcard, pipeline, or unresolved variable.The retained task records show:
Remove-Item -LiteralPath '<exact scratch file>' -Force, without recursion.Environment and evidence boundaries:
codex-cli 0.154.0-alpha.6.2.approval_policy=never,approvals_reviewer=user,sandbox_policy.type=danger-full-access; modelgpt-6-astra.OpenAI.Codex 26.908.4834.0.26200.9445, 25H2, x64; tool-shell PowerShell7.6.5.The operator already has AGENTS.md guidance to use direct commands, separate process startup from health checks, and simplify compound invocations. The standalone deletion still failed. This is distinct from the process-launch/unrelated-URL case in #40060.
The forced-delete classifier and
Never -> Forbiddenbehavior discussed above are consistent with this result, but no runtime classifier trace or internal rule ID was returned. The evidence does not establish that an automatic model reviewer denied anything.Please expose the matched policy condition and effective approval conflict, and document a supported way to authorize a narrowly scoped forced cleanup. In particular, Full Access plus approvals disabled currently presents as a generic refusal, and AGENTS.md instructions or renewed textual consent cannot explain or resolve it.
Submitted at the account holder's request. Private paths, project names, credentials, raw logs, and conversation identifiers are omitted.
PhilippElhaus commentedon Sep 13, 2026
Additional Windows IDE occurrence, 2026-09-13: authorized temporary-file cleanup
Adding this report at the account owner's request. The same pre-launch rejection occurred during explicitly requested cleanup after a maintenance task, including deletion of one ordinary task-created temporary file without recursion.
Environment checked during follow-up
10.0.26200, x64; PowerShell7.6.5.openai.chatgpt, version26.908.40401.codex --versionis bundled in that extension and reportscodex-cli 0.154.0-alpha.6.2.sandbox_mode = "danger-full-access",approval_policy = "never", unrestricted filesystem / disabled permission profile. The inspected user configuration agrees with those sandbox and approval values.The versions above were collected during diagnosis, rather than independently recorded at the instant of each earlier denial.
Observed operation and result
The user explicitly requested stale/task-file cleanup. Workspace instructions also authorize verified task-owned temporary cleanup. Separate read-only inspection established the target's ownership and ordinary-file status. The submitted deletion script checked that the exact file was below the OS temporary directory, outside the workspace drive, and not a reparse point, then requested this operation (variable name sanitized):
The entire command was rejected before PowerShell started:
The embedded checks therefore did not execute in that rejected call. No rule identifier, classifier explanation, or approval handoff was returned. Cache/directory cleanup had also been rejected earlier in the task. The narrow single-file case involved no recursion or wildcard.
This prevented removal of a short-lived deployment credential artifact after its authorized use. The file remains access-restricted, but retention is longer than intended. No credential values, real paths, raw logs, or private project details are included here.
Diagnosis and limits
default.rulescontains three allow rules, zero prompt rules, and zero forbidden rules. It has noRemove-Itementry. The user config has no[auto_review]override. This is not an audit of every possible managed or runtime policy source.rust-v0.154.0-alpha.6.2, commitb5bffd3ec4db487e7e3dec59663875b0ef7b72ca, is consistent with this result:has_force_delete_cmdletdetects a deletion cmdlet with-Force;Nevermaps a dangerous command toForbidden; the WindowsOthercategory producesblocked by policy.Please expose the matched command check and its conflict with
approval_policy=never, and document the supported approval path for narrowly scoped, explicitly authorized cleanup. The current generic error makes it difficult to distinguish a built-in command check from repository instructions, managed rules, or model-review decisions.