Skip to content

Windows sandbox setup fails applying deny ACE to E: repository .agents directory. #46062

Open

Description

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

26.908.70816

What subscription do you have?

Corporate

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Environment:

  • Codex version/binary: 12219cbfbcbddde7
  • Command runner: 0.154.0-alpha.6.2
  • OS: Windows
  • Repository: local NTFS volume E:
  • Working repository: E:\repos\trunk\server
  • Failure is reproducible after restarting Codex
  • C: checkout works; E: checkout fails

Reproduction:

  1. Start a new Codex chat against E:\repos\trunk\server.
  2. Ask Codex to read temp.txt.
  3. Command execution triggers sandbox setup.
  4. Sandbox setup fails before the command can complete.

Relevant log:
[2026-09-16T23:54:05.594901900+00:00] deny ACE failed on E:\repos\trunk\server.agents: SetNamedSecurityInfoW failed for E:\repos\trunk\server.agents: 5
[2026-09-16T23:54:05.601425+00:00] setup refresh: processed 3 write roots (read roots delegated); errors=[...]
[2026-09-16 16:54:05.612 codex.exe] setup refresh: exited with status ExitStatus(1)

Additional details:

  • Visualization ACL grant succeeds.
  • E: is NTFS, Fixed, Healthy.
  • The folder owner is BUILTIN\Administrators.
  • Administrators has Full Control.
  • CodexSandboxUsers has Modify access on the repository.
  • An elevated PowerShell session can successfully add an explicit Administrators Full Control ACE.
  • The same deny-ACE failure continues after restarting Codex.
  • The command log shows:
    C:\WINDOWS\system32\cmd.exe /c cmd /c type temp.txt

Expected:
Sandbox setup should configure the repository and allow the command runner to read temp.txt.

Actual:
Sandbox setup returns ERROR_ACCESS_DENIED (5) while applying the deny ACE to .agents.

What steps can reproduce the bug?

Open/Create a project pointing to a repo folder on my newly installed E drive using the desktop app. Ask it to read the contents of a temp.txt file that I placed in the root folder of the repo.

What is the expected behavior?

I expect that the file should be read. If I Open/Create a project pointing to a repo folder on my C Drive, it can read the file that I put there.

Additional information

I had the Codex app guide me through a series of steps to isolate the problem and have pasted its analysis into this issue.

2026 0913 codes sandbox logs.txt

Activity

  1. added
    app
    on Sep 17, 2026
  2. added
    bug
    windows-os
    sandbox
    on Sep 17, 2026
  3. tdim17 commented on Sep 20, 2026

    @tdim17

    I can reproduce a closely related failure in Codex Desktop on Windows with the native elevated sandbox.

    Environment:

    • Desktop CLI: codex-cli 0.155.0-alpha.9.2
    • VS Code extension CLI: codex-cli 0.148.0-alpha.21
    • Repository is on a local D: drive. The affected path is <repo>\.agents.

    In Desktop, even Get-Location fails before PowerShell starts with helper_unknown_error: setup refresh had errors. The sandbox log reports deny ACE failed on <repo>\.agents: open deny ACL target for update.

    A short Process Monitor capture identified the failing operation:

    Process: codex-windows-sandbox-setup.exe
    Operation: CreateFile
    Path: <repo>\.agents
    Result: ACCESS DENIED
    Desired Access: Read Attributes, Read Control, Write DAC, Synchronize
    

    The repository root is owned by the normal local Windows user, while .agents is owned by the local CodexSandboxOffline account. ACL inheritance is enabled, .agents is not a reparse point, and icacls /verify succeeds. I have not changed the owner or ACL because it is not yet clear whether this ownership is expected.

    Codex in VS Code can run commands in the same repository as CodexSandboxOffline. Desktop commands also work in a separate workspace, and a temporary switch to unelevated worked; returning to elevated reproduces the failure. I need to keep elevated for Desktop and avoid disrupting the working VS Code setup.

    Could you confirm whether this is the same setup-refresh issue and whether there is a supported repair for the failed Write DAC access? I can provide a narrow, redacted diagnostic excerpt if helpful.

  4. jeffrey-zola-thermofisher commented on Sep 22, 2026

    @jeffrey-zola-thermofisher
    Author

    These symptoms look like the same things that is happening to me.

    We do not use VS Code, so I cannot whether anything there applies or not. The original problem occurs within the ChatGPT desktop app.

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

    appbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions