Skip to content

Windows Codex app: apply_patch can add files but fails to update/delete with apply deny-read ACLs #32121

Open

Description

@csobrino00

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

OS: Windows Codex Desktop App package: OpenAI.Codex_26.707.3748.0_x64__2p2nqsd0c76g0

What subscription do you have?

Pro

What platform is your computer?

Windows

What issue are you seeing?

In the Windows Codex desktop app, apply_patch can successfully create new files, but it fails when trying to update or delete existing files inside writable workspace roots.

This happens even though the same files are readable and writable through PowerShell.

What steps can reproduce the bug?

Feedback ID: 019cfc4f-fccb-7550-8596-481e273ab17c

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    app
    on Jul 10, 2026
  2. added
    bug
    windows-os
    sandbox
    tool-calls
    on Jul 10, 2026
  3. github-actions commented on Jul 10, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. Lakshay-24 commented on Jul 12, 2026

    @Lakshay-24

    I can reproduce this exact failure on a native Windows host with an NTFS checkout.

    Error

    apply_patch verification failed:
    Failed to read file to update
    C:\Users\laksh\Reels Maker Stack\OpenMontage\apps\creator-studio-web\lib\jobExecution.ts:
    fs sandbox helper failed with status exit code: 1:
    windows sandbox failed:
    helper_unknown_error: apply deny-read ACLs
    

    Diagnostics

    • Workspace is under C:\Users\laksh\Reels Maker Stack on NTFS.
    • Normal sandboxed PowerShell reads succeed.
    • git status and git rev-parse succeed.
    • Unsandboxed/elevated reads succeed.
    • apply_patch can sometimes create a new file.
    • apply_patch cannot read, update, or replace an existing tracked file.
    • Both absolute and workspace-relative patch paths fail.
    • icacls /reset and re-enabling inherited permissions did not fix it.
    • Restarting Codex and rebooting Windows did not fix it.
    • The failure occurs during patch verification, before the patch is applied.
    • No repository file is modified when the operation fails.

    This strongly suggests a failure in the Codex Windows sandbox ACL helper while applying the deny-read ACL profile, rather than a Git problem or ordinary repository permissions issue.

  5. wbdb commented on Sep 18, 2026

    @wbdb

    On Windows, apply_patch fails after creating a file in a writable workspace. Creating the file may report success, but updating or deleting it fails during patch verification with: "windows sandbox failed: helper_unknown_error: apply deny-read ACLs". Basic command execution may fail with the same error, so the file cannot be verified or reliably cleaned up.

    @chess-oai @etraut-openai ChatGPT Windows App Version 26.915.31029 - Business Premium subscription.

    What steps can reproduce the bug?

    1. Use apply_patch to create a temporary file in a writable workspace.
    2. Use apply_patch again to update or delete the same file.
    3. Observe: "windows sandbox failed: helper_unknown_error: apply deny-read ACLs".

    Invoking the bundled codex.exe --codex-run-as-apply-patch with the same patch works as a workaround, which suggests the failure is in the direct tool’s Windows sandbox/ACL setup rather than in the patch contents or repository permissions.

  6. chess-oai commented on Sep 18, 2026

    @chess-oai
    Contributor

    could you share the setup error: entry and following error lines from %USERPROFILE%\.codex\.sandbox\sandbox.YYYY-MM-DD.log after reproducing?

    also, is .codex\.sandbox\deny_read_acl_state.json empty or valid json? no need to share its contents

  7. wbdb commented on Sep 18, 2026

    @wbdb

    @chess-oai

    After reproducing, the relevant log entry is:

    [2026-09-18T15:46:59.604449900+00:00] setup error: apply deny-read ACLs

    Caused by:
    0: parse deny-read ACL state .codex.sandbox\deny_read_acl_state.json
    1: expected value at line 1 column 1

    The same error is repeated for subsequent sandbox setup attempts, followed by exit status 1.

    deny_read_acl_state.json the parser fails immediately at line 1, column 1. The file is not empty, but it contains only whitespace and is therefore not valid JSON.

    Edit:
    Unfortunately, Codex used up half of my weekly limit because of the error. I didn't notice it until it was too late. I found a temporary workaround to fix the errors. After deleting the two folders, I restarted ChatGPT and let it reconfigure the sandbox. After that, it worked again.

    %USERPROFILE%\.codex\.sandbox-bin
    %USERPROFILE%\.codex\.sandbox
    

    I suspect something must have gone wrong with one of the most recent updates (the last one or the one before that); in any case, I hadn't changed any settings before that.

  8. NATTOOOOOO commented on Sep 30, 2026

    @NATTOOOOOO

    Withdrawn by the author. This diagnostic comment was posted prematurely.

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

    appbugsandboxtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions