You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows sandbox startup and elevated setup fail when deny-read ACL state is zero-filled #47950
Browser-control initialization and ordinary sandboxed commands fail before reaching the requested website or command. Retrying after an app-restart attempt and rerunning the supported elevated Windows sandbox setup did not resolve the failure.
Environment
Windows 10, build 19045.
Native elevated Windows sandbox.
Installed CLI: 0.155.0-alpha.16.4 (desktop app version not independently verified).
Reproduced September 24, 2026.
Observed behavior
The startup error is:
windows sandbox failed: helper_unknown_error: apply deny-read ACLs
The sandbox log narrows this to:
parse deny-read ACL state <CODEX_HOME>/.sandbox/deny_read_acl_state.json
expected value at line 1 column 1
Read-only inspection found that this state file is 22 bytes, all NUL bytes, rather than valid JSON. Why it became zero-filled is unknown.
The documented windowsSandbox/setupStart request with mode: elevated returned started: true, followed by windowsSandbox/setupCompleted with success: false and the same apply deny-read ACLs error. The file remained zero-filled after this attempt.
Expected behavior / recovery request
Sandbox setup should provide a supported recovery path or an actionable diagnostic for malformed persisted ACL state. Please advise how to recover without blindly deleting permissions bookkeeping.
No manual ACL changes, state-file replacement/deletion, or sandbox bypass was attempted. No private conversation, account credentials, or full logs are attached.
The saved nested diagnostic identifies JSON parsing of deny_read_acl_state.json:
expected value at line 1 column 1
Read-only inspection of the file named in that diagnostic found exactly 22 bytes, all NUL bytes, not valid JSON. The cause of the corruption is unknown.
Please provide a supported recovery procedure for this malformed persisted state that preserves the sandbox's security restrictions.
Root cause and workaround confirmed on Windows 11 Pro, codex-cli 0.157.1 (npm) + Codex app 26.924.2738.0, [windows] sandbox = "elevated".
Trigger: an unclean power-cycle reboot while codex was running. %USERPROFILE%\.codex\.sandbox\deny_read_acl_state.json was left as 22 bytes of 0x00 (mtime = 2 minutes before boot). NTFS had already allocated the new extent for the rewrite when power was cut, so the size survived but the content did not.
Why it kills every command:codex-rs/windows-sandbox-rs/src/deny_read_state.rs
store_state uses std::fs::write (in-place overwrite, no temp-file + rename, no fsync) -> torn write on power loss.
load_state treats NotFound as a fresh state but any parse error as fatal -> setup error: apply deny-read ACLs / Caused by: parse deny-read ACL state ... / expected value at line 1 column 1 in .sandbox\sandbox.<date>.log, surfaced to the agent as helper_unknown_error: apply deny-read ACLs on every exec_command. Restarting CodexSandboxService, re-running elevated setup, or reinstalling does not help because the corrupt file is never touched. (main is byte-identical to rust-v0.157.1 for this file, so 0.158.0 behaves the same.)
The 22-byte size is exactly serde_json::to_vec_pretty of the empty state {"principals": {}}.
Workaround (worked immediately): back up and delete the file, then run any command - the helper recreates it:
Detection: the file is exactly 22 bytes and every byte is 0x00.
Suggested fix: write atomically (temp file in the same dir + rename, ideally fsync) and make load_state tolerant - on a parse error, rename the bad file aside (*.corrupt) and continue with the default state instead of failing the whole sandbox.
Activity
github-actions commentedon Sep 24, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
TravelerAnt commentedon Sep 26, 2026
Additional confirmation from an affected Windows installation:
OpenAI.Codex 26.917.9434.00.155.0-alpha.16.4Browser/Computer Use fails before navigation:
The saved nested diagnostic identifies JSON parsing of
deny_read_acl_state.json:Read-only inspection of the file named in that diagnostic found exactly 22 bytes, all NUL bytes, not valid JSON. The cause of the corruption is unknown.
Please provide a supported recovery procedure for this malformed persisted state that preserves the sandbox's security restrictions.
chatsojang-lgtm commentedon Sep 28, 2026
Root cause and workaround confirmed on Windows 11 Pro, codex-cli 0.157.1 (npm) + Codex app 26.924.2738.0,
[windows] sandbox = "elevated".Trigger: an unclean power-cycle reboot while codex was running.
%USERPROFILE%\.codex\.sandbox\deny_read_acl_state.jsonwas left as 22 bytes of 0x00 (mtime = 2 minutes before boot). NTFS had already allocated the new extent for the rewrite when power was cut, so the size survived but the content did not.Why it kills every command:
codex-rs/windows-sandbox-rs/src/deny_read_state.rsstore_stateusesstd::fs::write(in-place overwrite, no temp-file + rename, no fsync) -> torn write on power loss.load_statetreatsNotFoundas a fresh state but any parse error as fatal ->setup error: apply deny-read ACLs / Caused by: parse deny-read ACL state ... / expected value at line 1 column 1in.sandbox\sandbox.<date>.log, surfaced to the agent ashelper_unknown_error: apply deny-read ACLson everyexec_command. RestartingCodexSandboxService, re-running elevated setup, or reinstalling does not help because the corrupt file is never touched. (main is byte-identical torust-v0.157.1for this file, so 0.158.0 behaves the same.)serde_json::to_vec_prettyof the empty state{"principals": {}}.Workaround (worked immediately): back up and delete the file, then run any command - the helper recreates it:
Detection: the file is exactly 22 bytes and every byte is 0x00.
Suggested fix: write atomically (temp file in the same dir +
rename, ideally fsync) and makeload_statetolerant - on a parse error, rename the bad file aside (*.corrupt) and continue with the default state instead of failing the whole sandbox.