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 fails all read operations with "apply deny-read ACLs" after power outage #28248
Caused by:
0: parse deny-read ACL state C:\Users\{user}\.codex\.sandbox\deny_read_acl_state.json
I reviewed deny_read_acl_state.json and the file was empty filled with NULLs and malformed.
This points to the implementation of the sandbox not validating the ACL config files upon initialization and remedying the issue by rebuilding if it is malformed or missing. This shouldn't persist through resets and reinstalls.
Thank you so much! This fixed the issue completely.
I had been struggling with this for over a month and tried reinstalling Codex, SFC, DISM, changing permissions, and everything else.
Deleting deny_read_acl_state.json immediately resolved it.
Really appreciate you taking the time to investigate this and share the fix!
Reacted by coro-bot, Hasan Bazerbashi, danielGz, Eric Fedosejevs, Ivan Yashin and vera
It was exactly 22 bytes long, matching the reported NUL-byte corruption.
For a recoverable fix, I fully preserved the corrupted file by renaming it to:
deny_read_acl_state-corrupt_backup.json
I then fully exited Codex using File > Exit and reopened it.
After restarting Codex, direct read-only PowerShell commands worked normally again, including Get-Content against the previously inaccessible workspace. The sandbox error is resolved.
*** It would be helpful if Codex detected malformed, empty, or NUL-filled deny_read_acl_state.json files during startup and automatically rebuild them instead of permanently blocking sandbox initialization.
No reinstall or database repair was required. This is consistent with a state-write durability problem: notably, the NUL-filled file has the same 22-byte length as the formatted empty state currently written by Codex.
Suggested hardening:
Write the state to a sibling temporary file.
Flush it and atomically replace the destination.
On startup, treat empty, NUL-filled, or invalid JSON as recoverable state and rebuild it instead of blocking every sandboxed command.
Add a regression test that simulates interruption after file sizing but before payload persistence.
All usernames, machine names, project paths, SIDs, task/thread IDs, and business command text have been removed.
I can reproduce this on Windows in the Codex desktop environment after a recent update. CDP is enabled, but both the local PowerShell command runner and the Node/Computer Use bridge fail before user code runs with: windows sandbox failed: helper_unknown_error: apply deny-read ACLs. Browser/CDP control is unavailable as a consequence. Restarting/retrying did not resolve it. This also prevents mouse/desktop control from starting. Please investigate the Windows sandbox/helper regression.
I just hit this one too -- power outage in the middle of a Codex session, upon restart the sandbox was broken. Error message led straight to this issue, and after renaming %USERPROFILE%\.codex\.sandbox\deny_read_acl_state.json (which was just 22 NULs) and restarting VS Code we're up and running again.
Environment: Windows 10 Home 25H2, build 26200.9168; VS Code 1.133.0 x64; Codex extension openai.chatgpt 26.810.52044; PowerShell.
I have a ready-to-cherry-pick hardening patch against current main ade0cca that addresses both the observed NUL-filled state file and lost updates when multiple sandbox processes refresh ACL state concurrently.
The patch makes ACL reconciliation and persistence one cross-process transaction using a named Windows mutex. State is written to a sibling temporary file, flushed and synced, then installed with ReplaceFileW or write-through MoveFileExW. Read handles allow delete sharing so replacement is not blocked. Invalid JSON, including the repeatedly reported 22-byte NUL file, is quarantined and rebuilt instead of permanently blocking every sandboxed command.
isolated NUL-filled-state quarantine/recovery test passed
cargo fmt check clean
just fix -p codex-windows-sandbox completed successfully
The patch also includes regression tests for replacement while a reader is open and for concurrent thread/process updates. Those concurrency tests passed on the original patch base; this refreshed verification did not rerun the deliberate concurrency cases.
This is intended to replace the manual delete-the-state-file recovery with durable write semantics plus automatic recovery from already-corrupt state.
Activity
github-actions commentedon Jun 15, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
romansydiuk-dev commentedon Jun 15, 2026
This may be related to issue #27889.
Both issues appear to fail during Windows ACL operations.
My sandbox starts, but any read operation fails:
pwd
Get-ChildItem .
Get-Content .\hello.txt
All return:
windows sandbox: helper_unknown_error: apply deny-read ACLs
Unlike #27889, I do not use elevated sandbox mode and the issue started immediately after a power outage during an active Codex task.
romansydiuk-dev commentedon Jun 15, 2026
After a power outage the issue persists across:
Codex reinstall
New projects
Full Access enabled
Windows SFC repair
DISM RestoreHealth
Multiple reboots
The sandbox cannot even execute:
pwd
Get-ChildItem .
Every operation fails with:
windows sandbox: helper_unknown_error: apply deny-read ACLs
coro-bot commentedon Jun 20, 2026
I experienced this myself after a system crash while using vscode+codex
Symptoms:
<setup_error.json>
<sandbox{date}.log>
I reviewed deny_read_acl_state.json and the file was empty filled with NULLs and malformed.
This points to the implementation of the sandbox not validating the ACL config files upon initialization and remedying the issue by rebuilding if it is malformed or missing. This shouldn't persist through resets and reinstalls.
Easy fix: delete .codex/.sandbox/deny_read_acl_state.json
chalkplum commentedon Jul 10, 2026
can confirm on windows 10 started getting the same error: apply deny-read ACLs
deleting file at: $HOME.codex.sandbox\deny_read_acl_state.json
resolved the issue
romansydiuk-dev commentedon Jul 12, 2026
Thank you so much! This fixed the issue completely.
I had been struggling with this for over a month and tried reinstalling Codex, SFC, DISM, changing permissions, and everything else.
Deleting deny_read_acl_state.json immediately resolved it.
Really appreciate you taking the time to investigate this and share the fix!
zippiguy commentedon Jul 27, 2026
Confirmed the same issue and recovery on Codex Desktop for Windows.
Every sandboxed command failed before execution with:
windows sandbox: helper_unknown_error: apply deny-read ACLs
The affected file was:
C:\Users\YOUR_USERNAME\.codex.sandbox\deny_read_acl_state.json
It was exactly 22 bytes long, matching the reported NUL-byte corruption.
For a recoverable fix, I fully preserved the corrupted file by renaming it to:
deny_read_acl_state-corrupt_backup.json
I then fully exited Codex using File > Exit and reopened it.
After restarting Codex, direct read-only PowerShell commands worked normally again, including Get-Content against the previously inaccessible workspace. The sandbox error is resolved.
*** It would be helpful if Codex detected malformed, empty, or NUL-filled deny_read_acl_state.json files during startup and automatically rebuild them instead of permanently blocking sandbox initialization.
niejiaqiang commentedon Aug 2, 2026
Independent confirmation that this issue is still present on Codex Desktop MSIX
26.727.6591.0/ bundled runner0.146.0-alpha.9.2.The affected file was:
It was exactly 22 bytes long and every byte was
0x00. The sandbox log repeatedly reported:I preserved the corrupt file, replaced it with a valid empty state object, and then observed repeated setup refreshes complete with:
No reinstall or database repair was required. This is consistent with a state-write durability problem: notably, the NUL-filled file has the same 22-byte length as the formatted empty state currently written by Codex.
Suggested hardening:
All usernames, machine names, project paths, SIDs, task/thread IDs, and business command text have been removed.
kecskeslaszlo94 commentedon Aug 14, 2026
I can reproduce this on Windows in the Codex desktop environment after a recent update. CDP is enabled, but both the local PowerShell command runner and the Node/Computer Use bridge fail before user code runs with:
windows sandbox failed: helper_unknown_error: apply deny-read ACLs. Browser/CDP control is unavailable as a consequence. Restarting/retrying did not resolve it. This also prevents mouse/desktop control from starting. Please investigate the Windows sandbox/helper regression.hxguo-ic commentedon Aug 15, 2026
The same issue was encountered. Here is the report generated by AI after it fixed the problem after referencing this issue.
ENVIRONMENT
26.810.7004.00.148.0-alpha.926.810.52044v24.19.0workspace-write2026-08-16ERROR
Sandboxed commands and Browser Use failed with:
The sandbox log showed:
CAUSE
deny_read_acl_state.jsonwas corrupted. It was 22 bytes long and contained 22 NUL (0x00) bytes instead of valid JSON.FIX
Back up and remove the corrupted files from their active location:
Codex then regenerated:
{ "principals": {} }RESULT
Normal sandboxed commands worked again, but the first Browser Use retry failed with:
CAUSE
The sandbox was still applying the required read permission to
AppData. The log showed:This appears to be a timing issue during the first sandbox initialization after state regeneration.
FIX
Wait for the ACL refresh to finish and retry Browser Use. No manual ACL reset was required.
RESULT
The second Browser Use attempt succeeded.
Final status:
errors=[]mmcgill commentedon Aug 16, 2026
I just hit this one too -- power outage in the middle of a Codex session, upon restart the sandbox was broken. Error message led straight to this issue, and after renaming
%USERPROFILE%\.codex\.sandbox\deny_read_acl_state.json(which was just 22 NULs) and restarting VS Code we're up and running again.Environment: Windows 10 Home 25H2, build 26200.9168; VS Code 1.133.0 x64; Codex extension openai.chatgpt 26.810.52044; PowerShell.
codex-review: add the corrupted deny-read ACL state row (#93)
jakobboss1010-source commentedon Sep 1, 2026
I have a ready-to-cherry-pick hardening patch against current main ade0cca that addresses both the observed NUL-filled state file and lost updates when multiple sandbox processes refresh ACL state concurrently.
The patch makes ACL reconciliation and persistence one cross-process transaction using a named Windows mutex. State is written to a sibling temporary file, flushed and synced, then installed with ReplaceFileW or write-through MoveFileExW. Read handles allow delete sharing so replacement is not blocked. Invalid JSON, including the repeatedly reported 22-byte NUL file, is quarantined and rebuilt instead of permanently blocking every sandboxed command.
Commit: jakobboss1010-source@3207dcb
Verification on refreshed main ade0cca:
The patch also includes regression tests for replacement while a reader is open and for concurrent thread/process updates. Those concurrency tests passed on the original patch base; this refreshed verification did not rerun the deliberate concurrency cases.
This is intended to replace the manual delete-the-state-file recovery with durable write semantics plus automatic recovery from already-corrupt state.