Skip to content

Windows Full access blocks authorized file cleanup without an approval path; use Auto-review or restore previous behavior #55197

Open

Description

@a86582751

What version of the Codex App are you using (From “About Codex” dialog)?

Installed Windows Appx package: OpenAI.Codex 26.1013.4894.0.
Bundled/running CLI: 0.163.0-alpha.10.2, verified from the executable and session metadata.
The About dialog was not independently checked.

What subscription do you have?

Not provided.

What platform is your computer?

Windows 11, build 26300.
PowerShell 7.7.0-preview.5, invoked through its real executable path.

What issue are you seeing?

The desktop app's Full access preset can reject explicitly authorized cleanup of project-owned temporary files before PowerShell starts, returning only blocked by policy. There is no approval dialog, useful rejection rationale, or supported way to authorize the operation in the conversation.

In my experience, earlier versions' Full access allowed this routine cleanup. I have not identified the first affected version, so the regression range is unknown.

The practical failure is: Codex cannot delete its temporary files, does not offer an approval window, and leaves the user to delete files manually or investigate/edit configuration. A permission preset intended for unattended work should provide a complete, understandable authorization path.

Recorded incidents

Two independently recorded tool rejections on October 19, 2026:

UTC time Operation Result
00:26:26.991Z Cleanup of 19 interrupted-test temporary directories using Remove-Item -LiteralPath ... -Recurse -Force Rejected before process creation; nothing deleted
01:12:50.685Z Non-recursive deletion of one ordinary 110-byte lock file, after its owning process had exited Rejected before process creation; user later deleted it manually

The effective turn context for both incidents was:

{
  "approval_policy": "never",
  "approvals_reviewer": "user",
  "sandbox_policy": { "type": "danger-full-access" }
}

Both commands used the PowerShell 7 executable directly, without cmd /c or a require_escalated request. The lock-file operation was an exact single-file deletion, not recursive cleanup.

The tool returned a CreateProcess rejection containing:

rejected: blocked by policy

It supplied no policy source, matched rule, reviewer identifier, rationale, or recovery instruction. Because PowerShell never started, this is not an observed PowerShell ACL/file-in-use error. These historical incidents also cannot be attributed to Auto-review: their recorded reviewer was user.

Diagnostic call IDs:

  • call_3d6ad2b4e04e45feb52c20007ae0d859
  • call_2954353d5fc444dc81f74386cae7fd8c

Impact on a real cleanup workflow

A separate repository-cleanup conversation documented an accumulation of old builds, candidates, caches, and temporary material. It eventually cleaned 623 targets covering 3,250,853 logical files and approximately 175.9 GiB of file lengths, including 175 old scripts.

However, cleanup of the cleanup task's own six remaining helper files, approximately 0.84 MiB, was still rejected with the same generic policy message, including a non-recursive command listing six absolute literal paths.

This demonstrates that large cleanup can succeed while narrowly scoped final cleanup remains blocked without an explanation. The 175.9 GiB figure is aggregate logical file size, not measured physical space reclaimed; I am not claiming that all of this accumulation was caused by these policy rejections.

Configuration and UI ambiguity

My intended defaults in config.toml are:

sandbox_mode = "danger-full-access"
approval_policy = "on-request"
approvals_reviewer = "auto_review"

The sandboxing documentation describes the UI Full access preset as danger-full-access + never, while Auto-review documentation explains that Auto-review handles requests that would otherwise require interactive approval. With never, there are no such approval requests to review.

A conversation-level Full access preset overriding file defaults could therefore explain why my intended Auto-review configuration was not active. This precedence explanation is a hypothesis, not a verified cause of the deletion rejection. The inspected config file's modification time was later than the two historical incidents, so its current contents do not independently establish its exact contents at those times.

The resulting UX requires users to understand the distinction between Full access, Custom/config defaults, approval policy, reviewer selection, and additional undisclosed enforcement.

Requested behavior / two proposed solutions

Please consider either of these product-level solutions:

  1. Make the UI Full access preset use danger-full-access + on-request + auto_review. This would give broad access while routing approval requests to Auto-review, allowing approved routine operations to proceed without manual approval dialogs or manual config editing.
  2. Restore the previous Full access behavior for explicitly authorized operations, so routine, bounded cleanup of disposable project files can complete as it did in earlier versions.

The first proposal does not assume Auto-review can override a separate hard policy denial. If an additional enforcement layer caused these incidents, that layer also needs a fix or a supported authorization path; changing the preset alone may not resolve it.

If an action must remain blocked, please show the actual policy source and rationale and provide an actionable resolution. A silent dead end with neither execution nor approval is the core problem.

Please also display the effective sandbox mode, approval policy, reviewer, and their configuration sources in the UI so users can see when a conversation preset overrides their defaults.

Local investigation and limitations

  • Inspected user rules contained 72 allow entries and no explicit forbidden/prompt entries; 10 mentioned Remove-Item. Exact argv matching was not tested.
  • No relevant project/ancestor .codex/config.toml or project rules were found.
  • The inspected local managed-configuration locations were absent.
  • These observations do not exclude built-in policies, remote requirements, or another enforcement layer.
  • A later context changed the reviewer to auto_review; no new deletion test was performed after that change, so it is not a verified fix.
  • No new deletion reproduction, permission modification, or alternative-tool workaround was attempted for this report.

Questions for maintainers

  1. Which policy/enforcement path can reject these commands before process creation under the recorded Full access context?
  2. Is this intended enforcement, a false positive, or a permission/configuration propagation defect?
  3. If Full access cannot authorize routine temporary-file cleanup, what supported UI workflow should users use without manual config editing?
  4. Can the app expose both effective permission sources and the precise reason for a rejection?

Reproduction status

These are observed incidents with recorded effective contexts, not a newly executed minimal reproduction. The operational sequence was: select Full access, explicitly authorize cleanup of disposable project files, and let Codex issue the bounded PowerShell deletion command. The tool rejected it before process creation without an approval route.

Private project paths, full configuration, credentials, raw transcripts, and file contents are omitted.

Related reports: #54610, #54746, #52966. This report adds exact single-file evidence, the cleanup-workflow impact, and the specific request to fix the desktop permission preset/approval experience.

Activity

  1. added
    enhancement
    app
    windows-os
    sandbox
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appenhancementsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions