Corrupted deny_read_acl_state.json causes persistent "apply deny-read ACLs" sandbox failures

Open
#34,276 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Locate the code that parses and regenerates .codex/.sandbox/deny_read_acl_state.json, then reproduce the failure with a file containing null bytes or invalid JSON. Done means corrupted state is safely recreated with an empty principals object and sandbox initialization succeeds; add or run coverage for the recovery path if the relevant tests are present.

Written by the indexing model from the issue text.

Description

app bug sandbox windows-os
What version of the Codex App are you using (From “About Codex” dialog)?

0.145.0-alpha.18

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Codex Desktop on Windows failed to initialize Browser Use and Computer Use.

The sandbox repeatedly failed with the following error:

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

The state file existed and was 22 bytes long, but its entire contents consisted of null bytes:

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

Because Codex kept trying to parse this corrupted file as JSON, all subsequent sandbox initialization attempts failed.

What steps can reproduce the bug?
  1. Start Codex Desktop on Windows.
  2. Attempt to use Browser Use or Computer Use.
  3. Codex fails before browser or screen control starts.
  4. Inspect this file:

C:\Users<user>.codex.sandbox\deny_read_acl_state.json

  1. The file contains only null bytes instead of valid JSON.
  2. Restarting Codex or Windows does not resolve the issue because the same corrupted state file is reused.

Workaround:

  1. Fully exit Codex.
  2. Rename:

deny_read_acl_state.json

to:

deny_read_acl_state.json.broken

  1. Restart Codex.

Codex then regenerates the file as:

{
"principals": {}
}

After regeneration, sandbox initialization succeeds.

What is the expected behavior?

Codex should detect that deny_read_acl_state.json is empty, corrupted, or invalid JSON and automatically recreate it.

A corrupted state file should not permanently block Browser Use and Computer Use across restarts.

Additional information

After renaming the corrupted file and restarting Codex, the following successful log entries appeared:

setup refresh: processed 3 write roots (read roots delegated); errors=[]
read-acl-only mode: applying read ACLs
setup binary completed
read ACL run completed

This suggests that the failure was caused specifically by the corrupted deny_read_acl_state.json file rather than Chrome login, the browser extension, or Windows permissions in general.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.