Windows sandbox fails permanently if deny_read_acl_state.json is corrupted

Open 💬 1 comment Opened Jun 29, 2026 by Wasif-Ali47

What issue are you seeing?

After an unexpected power interruption during a Codex session on Windows, the Codex sandbox became permanently unable to modify or delete project files.

The sandbox consistently fails during initialization with the following error:

setup error: apply deny-read ACLs

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

The file deny_read_acl_state.json became corrupted (it contained only null bytes instead of valid JSON).

Because the sandbox attempts to parse this file during every startup, initialization fails before sandbox setup completes.

Symptoms include:

  • Codex can read project files but cannot edit or delete them.
  • Sandbox initialization fails every session.
  • Orphaned DENY ACL entries were left on project folders after the crash.
  • Resetting the ACLs with icacls removed the orphaned permissions but did not resolve the sandbox initialization failure because the corrupted state file continued to prevent startup.

The logs consistently point to the same parsing failure, making the sandbox unusable until the corrupted state is manually removed.

What steps can reproduce the bug?

  1. Start a Codex session on Windows using the VS Code extension.
  2. Allow the sandbox to initialize and begin working on a repository.
  3. Interrupt the session unexpectedly (for example, a power outage or forced shutdown while Codex is running).
  4. Reopen VS Code and start another Codex session.
  5. The sandbox attempts to read C:\Users\<username>\.codex\.sandbox\deny_read_acl_state.json.
  6. If that file is corrupted, sandbox initialization fails with:
setup error: apply deny-read ACLs

Caused by:
parse deny-read ACL state
expected value at line 1 column 1

From this point onward every new Codex session fails until the corrupted sandbox state is manually removed.

What is the expected behavior?

If deny_read_acl_state.json is missing, empty, or contains invalid JSON, the sandbox should treat it as recoverable state.

Expected behavior:

  • Ignore the corrupted state file.
  • Recreate a fresh deny_read_acl_state.json.
  • Continue sandbox initialization normally.
  • Avoid leaving orphaned DENY ACL entries on project folders.
  • Never allow a corrupted cache/state file to permanently prevent future sandbox sessions.

Additional information

Environment:

  • Windows 11
  • VS Code
  • Official OpenAI Codex extension

Additional observations:

  • setup_error.json contains:
{
  "code": "helper_unknown_error",
  "message": "apply deny-read ACLs"
}

The sandbox log contains:

setup error: apply deny-read ACLs

Caused by:
    0: parse deny-read ACL state
    1: expected value at line 1 column 1

The original deny_read_acl_state.json became corrupted and consisted entirely of null bytes.

Running icacls confirmed orphaned DENY ACL entries on .git and .agents. Resetting those ACLs removed the DENY entries successfully, but Codex still failed because the sandbox aborted while parsing the corrupted state file.

This appears to be a recovery issue in the Windows sandbox helper. A corrupted state file should not permanently prevent sandbox initialization after an unexpected shutdown.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗