Skip to content

Windows sandbox fails before every shell command: deny_read_acl_state.json contains null bytes #51605

Open

Description

@altiviongroupfzco-lgtm

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

26.1002.51308

What subscription do you have?

ChatGPT Pro 100

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

Codex desktop on Windows cannot launch sandboxed shell commands, including
a minimal read-only Get-Location command. Execution fails before the command
runs.

User-facing error:

Failed to create unified exec process: helper_unknown_error: apply deny-read ACLs

The sandbox log identifies the underlying failure:

[2026-10-07T06:44:30.018997800+00:00] setup error: apply deny-read ACLs

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

[2026-10-07 10:44:30.023 codex.exe] setup refresh: exited with status ExitStatus(ExitStatus(1))

The affected state file is 22 bytes long. Its first 16 bytes are:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I preserved a backup without modifying or deleting the original file.

What steps can reproduce the bug?

These steps reproduce the execution failure on my affected installation.
I do not know how to reproduce the original state-file corruption.

  1. Open a local project in Codex desktop on Windows.
  2. Ask Codex to run this minimal command using its normal sandboxed shell:
    Get-Location
  3. Use login: false, with the project directory as the working directory.
  4. Execution fails before the shell process starts:
    Failed to create unified exec process: helper_unknown_error: apply deny-read ACLs

Exact diagnostic prompt:

“Perform one minimal execution diagnostic only. Using the normal shell tool,
run Get-Location with login: false in the project directory. Do not invoke Git,
read project files, create files, request escalation, change permissions, or
try alternative execution routes. Report whether the process started and the
exact output or error. Stop after this single attempt.”

The failure persists after fully restarting the desktop app.

It also occurs in a newly created independent Git clone with its own .git
directory, not just in the original linked Git worktree.

Ordinary PowerShell outside Codex successfully runs Git and file operations.

The observed failure occurs during sandbox setup, before command execution.

What is the expected behavior?

A permitted read-only command such as Get-Location should launch successfully.

If the sandbox ACL state file is malformed, Codex should report the specific
problem and provide a supported recovery procedure that reconciles existing
filesystem permissions.

Recovery should preserve sandbox protections and should not require users to
guess whether deleting the ACL state file or replacing it with empty JSON is safe.

Additional information

Troubleshooting already performed:

  • Fully restarted Codex desktop.
  • Tested a minimal Get-Location command with no Git operations.
  • Reproduced the failure in an independent Git clone.
  • Verified the new clone's Git integrity successfully using ordinary PowerShell.
  • Used Settings > Diagnose: “Codex dependencies look healthy.”
  • Preserved the malformed state file and relevant sandbox log excerpt.
  • Did not delete/reset sandbox state or manually change ACLs during this investigation.

Settings visible during troubleshooting:

  • Approval policy: On request
  • Sandbox settings: Read only

Workspace Dependencies version shown in Settings: 26.904.11930.
This is the dependency-bundle version, not a confirmed desktop app or CLI version.

A separate warning appears in Settings:
“[features.guardianv2].thread_context is deprecated and ignored.”
No causal connection to the sandbox failure has been established.

A support case has also been opened.

Please advise how to safely recover the corrupted deny_read_acl_state.json
while accounting for ACL changes previously applied by Codex.

Activity

  1. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    sandboxIssues related to permissions or sandboxing
    on Oct 7, 2026
  2. mhj-tw commented on Oct 7, 2026

    @mhj-tw

    [Windows][Codex App] Elevated sandbox refresh fails with os error 32 when desktop MCP/runtime processes lock cua_node files

    Note: codex doctor reports the installed desktop application as 26.1002.6548.0.
    Codex CLI version used for diagnostics: 0.160.1.

    Microsoft Windows NT 10.0.26200.0 x64
    Windows 11 Professional
    Locale: de-DE

    The Codex Desktop App on Windows causes the elevated Windows sandbox to become unusable because processes started by the desktop app keep files inside the bundled cua_node runtime open.

    A subsequent sandboxed command fails before the requested command is started:

    helper_unknown_error: setup refresh had errors

    codex doctor then reports:

    elevated Windows sandbox provisioning recorded a structured failure
    sandbox provisioning: failed
    error code: helper_unknown_error

    The underlying sandbox log shows a Windows sharing violation (os error 32) while codex-windows-sandbox-setup.exe performs runtime read/execute ACL validation.

    Initially, while the configured node_repl MCP server was active, the failing file was:

    C:\Users<user>\AppData\Local\OpenAI\Codex\runtimes\cua_node<runtime>\bin\node_repl.exe

    Log excerpt:

    runtime read/execute validation failed:
    validate runtime read/execute access on
    ...\bin\node_repl.exe:
    open ACL target for root-only update:
    The process cannot access the file because it is being used by another process.
    (os error 32)

    After disabling the node_repl MCP server, codex doctor became healthy again, but starting/using the Codex Desktop App reproduced the sandbox failure on another file inside the same cua_node runtime:

    ...\bin\node_modules@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll

    Log excerpt:

    runtime read/execute validation failed:
    validate runtime read/execute access on
    ...@OAI\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll:
    open ACL target for root-only update:
    The process cannot access the file because it is being used by another process.
    (os error 32)

    The sandbox setup refresh then ends with:

    setup refresh completed with errors
    setup error: setup refresh had errors

    The requested command itself is never started.

    This is reproducible only while the Codex Desktop App and its internally started runtime/MCP processes are active.

    When the Codex Desktop App is fully closed, its child processes are terminated, and the elevated sandbox is provisioned again, the same repository commands work normally through the npm Codex CLI in elevated sandbox mode.

  3. altiviongroupfzco-lgtm commented on Oct 7, 2026

    @altiviongroupfzco-lgtm
    Author

    Renaming the null-filled state file resolved the JSON parsing failure. Sandbox setup now repeatedly fails, including after a Windows restart, with runtime read/execute validation failed on cua_node...\bin\node_repl.exe, reporting Windows error 32 (sharing violation). Read-ACL processing completes, but setup exits with setup refresh had errors.

  4. altiviongroupfzco-lgtm commented on Oct 7, 2026

    @altiviongroupfzco-lgtm
    Author

    Exact-path and filename searches with Microsoft Handle returned “No matching handles found,” despite sandbox setup reporting a sharing violation on node_repl.exe. The conflict may require tracing during the failing setup operation.

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

    appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions