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
Codex Desktop Windows sandbox setup fails on NTFS ACL / SetNamedSecurityInfoW error 5, then agents fall back to unsandboxed PowerShell escalation #31620
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.623.141536 • Released 7 июл. 2026 г.
What subscription do you have?
plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Product:
Codex Desktop on Windows
Version / build observed:
OpenAI.Codex_26.623.19656.0_x64
codex-command-runner-0.142.5.exe
Environment:
Windows, non-elevated Codex Desktop.
Workspace roots on D:\Projects..., NTFS owner was BUILTIN\Administrators.
Problem:
All sandbox modes that require filesystem setup can fail before any command runs.
The agent sees helper_unknown_error / setup refresh had errors.
After that, agents request require_escalated, so work continues through PowerShell outside sandbox. This is unsafe and extremely confusing.
Observed local errors:
C:\Users\arketov.codex.sandbox\setup_error.json:
{
"code": "helper_unknown_error",
"message": "setup refresh had errors"
}
Sandbox log:
write ACE grant failed on D:\Projects\miles\regionTMC: SetNamedSecurityInfoW failed: 5
setup refresh completed with errors
setup error: setup refresh had errors
Root cause:
Codex sandbox setup tries to grant write ACEs on workspace roots.
If the workspace root is owned by BUILTIN\Administrators and the non-elevated user lacks WRITE_DAC, Windows returns ERROR_ACCESS_DENIED (5).
Codex reports this as a generic helper failure instead of explaining the ACL problem or offering a UAC repair.
Expected behavior:
Codex should detect this and show a clear actionable error:
“Cannot prepare Windows sandbox ACLs for workspace root. Current user lacks WRITE_DAC. Run UAC repair / grant the user ACL rights / choose another workspace root.”
It should not silently degrade into agents requesting unsandboxed PowerShell escalation.
Workaround that fixed it locally:
Run elevated:
icacls "D:\Projects" /grant "%USERDOMAIN%%USERNAME%:(OI)(CI)(F)"
After this:
setup_error.json disappeared
sandbox log shows errors=[]
sandboxed exec_command works without require_escalated
Impact:
Paid Codex Desktop app appears broken on Windows for any workspace tree with admin-owned ACLs.
The error message hides the real cause.
The fallback path encourages unsafe unsandboxed execution.
I can reproduce this issue on the current Codex Desktop Windows build when the task workspace is a Microsoft OneDrive-synchronised folder.
Environment:
Codex Desktop: OpenAI.Codex_26.820.9563.0_x64
Windows x64
Workspace: D:\OneDrive - <Organisation>
Affected features: sandboxed commands, Chrome/browser control, and Computer Use across multiple models/tasks, including Luna
Observed error:
windows sandbox failed:
helper_unknown_error: setup refresh had errors
Relevant sandbox log lines:
granting write ACE to D:\OneDrive - <Organisation>
write ACE grant failed on D:\OneDrive - <Organisation>:
SetNamedSecurityInfoW failed: 5
setup refresh completed with errors
setup error: setup refresh had errors
The failure occurs before browser tab discovery or command execution. The Chrome extension and native-messaging setup validate correctly, so this is not an extension installation or login problem.
The same Codex runtime successfully initializes when a task is rooted under a local folder such as:
C:\Users\<user>\Documents\Codex\<task>
This suggests the sandbox's mandatory write-ACE operation is incompatible with, or lacks permission for, this OneDrive-managed workspace root. A rejected writable root aborts the complete sandbox setup, making unrelated browser and command features appear broken.
Expected behaviour:
Codex should support OneDrive-synchronised NTFS workspaces; or
detect the ACL limitation and use a safe alternative; or
immediately identify the rejected workspace path and recommend moving the task to a local folder.
It should not report only helper_unknown_error, because that misleadingly presents the problem as a browser-plugin or model failure.
I observed a related Windows Desktop sandbox setup failure, with partial ACL changes during a failed write-access request. I am not claiming the same root cause as this issue.
On 2026-09-12, a user-approved request for two project write roots was granted at the tool-permission level, but the subsequent ordinary command could not start:
helper_unknown_error: setup refresh had errors
write ACE grant failed on <PROJECT>\tests\<MODULE>: SetNamedSecurityInfoW failed: 5
Local before/after snapshots covered 151 owner/group/DACL descriptors. During that request interval:
39 descriptors changed: the source root and 38 source files.
The test root, its inspected files, and the two inspected direct parents were unchanged.
All 70 pinned file-content hashes matched before and after. This does not establish integrity of every file.
The snapshots were not atomic and did not include process-attributed auditing of each ACL write. They establish before/after differences, not the helper's exact token or every causal detail.
A limited read-only check on 2026-09-16 found the four directory descriptors unchanged from the post-failure snapshot. The two target directories and the test parent were owned by CodexSandboxOffline. I have not established who originally set that ownership. The shell also ran as CodexSandboxOffline, which does not establish the historical setuphelper identity. This ownership observation may also be relevant to #29867, but it does not prove the same cause or a safe repair.
There is no fresh minimal reproduction in this report. Exact incident app/helper versions and Windows build remain to be verified; I do not want to substitute current versions for incident versions. Successful reads in the current C:-based task do not prove write access to the original project on another drive.
Could maintainers clarify the expected helper token/impersonation context when granting write ACEs, and the supported recovery procedure for a partially applied multi-root permission request? Please specify affected objects/descendants and recovery precautions. I have not applied the broad ACL workaround from this issue or weakened the sandbox. Please advise whether partial-update recovery should be tracked separately.
App feedback ID: 01a0009c-ebb2-7170-afe3-fccef25a3a91. Feedback submission was confirmed; both optional diagnostic-log and browser-data options were unchecked according to the user. No raw logs, security descriptors, private project files, or session transcript are attached to this proposed comment.
Update: our local blockage is now resolved following a targeted ACL repair.
The failing directory was owned by CodexSandboxOffline. We granted the interactive user non-inheriting ChangePermissions (WRITE_DAC) on that single directory. The .NET API also added Synchronize. Ownership remained unchanged.
Afterward, normal sandbox setup succeeded with errors=[]. File creation, modification, reading and cleanup succeeded in both affected project directories. SHA-256 checks confirmed that all 147 existing files remained unchanged. The sandbox subsequently applied its normal access rules.
This confirms a working local repair, not a product-level fix. The historical failing helper’s exact token remains unverified. A clearer error identifying the affected path and required permission, together with a supported targeted repair flow, would still be valuable.
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Jul 8, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
McSlaine commentedon Aug 27, 2026
I can reproduce this issue on the current Codex Desktop Windows build when the task workspace is a Microsoft OneDrive-synchronised folder.
Environment:
OpenAI.Codex_26.820.9563.0_x64D:\OneDrive - <Organisation>Observed error:
Relevant sandbox log lines:
The failure occurs before browser tab discovery or command execution. The Chrome extension and native-messaging setup validate correctly, so this is not an extension installation or login problem.
The same Codex runtime successfully initializes when a task is rooted under a local folder such as:
This suggests the sandbox's mandatory write-ACE operation is incompatible with, or lacks permission for, this OneDrive-managed workspace root. A rejected writable root aborts the complete sandbox setup, making unrelated browser and command features appear broken.
Expected behaviour:
It should not report only
helper_unknown_error, because that misleadingly presents the problem as a browser-plugin or model failure.mulnico6-oss commentedon Sep 16, 2026
I observed a related Windows Desktop sandbox setup failure, with partial ACL changes during a failed write-access request. I am not claiming the same root cause as this issue.
On 2026-09-12, a user-approved request for two project write roots was granted at the tool-permission level, but the subsequent ordinary command could not start:
Local before/after snapshots covered 151 owner/group/DACL descriptors. During that request interval:
The snapshots were not atomic and did not include process-attributed auditing of each ACL write. They establish before/after differences, not the helper's exact token or every causal detail.
A limited read-only check on 2026-09-16 found the four directory descriptors unchanged from the post-failure snapshot. The two target directories and the test parent were owned by CodexSandboxOffline. I have not established who originally set that ownership. The shell also ran as CodexSandboxOffline, which does not establish the historical setuphelper identity. This ownership observation may also be relevant to #29867, but it does not prove the same cause or a safe repair.
There is no fresh minimal reproduction in this report. Exact incident app/helper versions and Windows build remain to be verified; I do not want to substitute current versions for incident versions. Successful reads in the current C:-based task do not prove write access to the original project on another drive.
Could maintainers clarify the expected helper token/impersonation context when granting write ACEs, and the supported recovery procedure for a partially applied multi-root permission request? Please specify affected objects/descendants and recovery precautions. I have not applied the broad ACL workaround from this issue or weakened the sandbox. Please advise whether partial-update recovery should be tracked separately.
App feedback ID:
01a0009c-ebb2-7170-afe3-fccef25a3a91. Feedback submission was confirmed; both optional diagnostic-log and browser-data options were unchecked according to the user. No raw logs, security descriptors, private project files, or session transcript are attached to this proposed comment.mulnico6-oss commentedon Sep 17, 2026
Update: our local blockage is now resolved following a targeted ACL repair.
The failing directory was owned by
CodexSandboxOffline. We granted the interactive user non-inheritingChangePermissions(WRITE_DAC) on that single directory. The .NET API also addedSynchronize. Ownership remained unchanged.Afterward, normal sandbox setup succeeded with
errors=[]. File creation, modification, reading and cleanup succeeded in both affected project directories. SHA-256 checks confirmed that all 147 existing files remained unchanged. The sandbox subsequently applied its normal access rules.This confirms a working local repair, not a product-level fix. The historical failing helper’s exact token remains unverified. A clearer error identifying the affected path and required permission, together with a supported targeted repair flow, would still be valuable.