Windows sandbox: apply_patch can add files but cannot update/delete existing files due to apply deny-read ACLs

Open 💬 3 comments Opened Jul 6, 2026 by Traveller23

What version of Codex CLI is running?

codex-cli 0.142.5

What subscription do you have?

business

Which model were you using?

gpt-5.5

What platform is your computer?

Microsoft Windows NT 10.0.26200.0

What terminal emulator and version are you using (if applicable)?

Windows PowerShell 5.1.26100.8655

Codex doctor report

What issue are you seeing?

On Windows, apply_patch can create new files, but fails whenever it needs to read an existing file for Update File or Delete File. The failure happens even in a clean repro directory outside the main
project, so it does not appear related to project config, AGENTS.md, Git state, dependencies, symlinks, or file ACLs.

Error:

apply_patch verification failed: Failed to read file to update ...:
fs sandbox helper failed with status exit code: 1:
windows sandbox failed: helper_unknown_error: apply deny-read ACLs

What steps can reproduce the bug?

cd C:\data\javascript
mkdir codex-sandbox-repro
cd codex-sandbox-repro
git init
mkdir .scratch
"hello" | Set-Content .scratch\test.txt
Get-Content .scratch\test.txt

Then ask Codex to run:

* Begin Patch
* Update File: .scratch/test.txt
@@
-hello
+hello world
*** End Patch

Observed:

  • apply_patch Add File succeeds.
  • Get-Content can read the file.
  • icacls shows normal inherited permissions including CodexSandboxUsers modify rights.
  • apply_patch Update File fails with apply deny-read ACLs.
  • apply_patch Delete File fails with the same error.
  • Running shell commands with escalation works, so a workaround is to use PowerShell writes, but apply_patch has no escalation parameter.

What is the expected behavior?

apply_patch should be able to read and update/delete files inside the workspace when normal shell reads succeed and ACLs permit access.

Additional information

  • Starting Codex from the project root and using relative paths did not help.
  • Reading the target with Get-Content immediately before apply_patch did not help.
  • Switching to “Approve for me” did not help.
  • The same failure reproduced in a clean C:\data\javascript\codex-sandbox-repro git repo.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗