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: shell commands fail with helper_sandbox_lock_failed (error 5) #45153
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems
I can reproduce this on the same Codex App build (26.908.40834) on Windows.
Observed behavior:
Every local command, including harmless read-only commands, fails before execution.
Error: helper_sandbox_lock_failed: lock sandbox bin dir C:\Users\<user>\.codex\.sandbox-bin failed: SetNamedSecurityInfoW sandbox dir failed: 5
The failure persists after a normal Windows restart, app Repair, and app Reset.
Read-only ACL inspection of C:\Users\<user>\.codex\.sandbox-bin showed:
Owner: BUILTIN\Administrators
Principals include CodexSandboxUsers, SYSTEM, Administrators, and the current user.
The current user's advanced permissions do not include Change permissions (WRITE_DAC). No ACL/ownership changes were made.
This is notable because the current Windows sandbox implementation appears to expect the real-user mask on .sandbox-bin to include WRITE_DAC so the unelevated refresh can reapply the protected DACL.
I have intentionally not tried manual ACL repair, sandbox-directory deletion, Defender/security-control changes, privilege escalation, or alternate-shell bypasses.
A supported recovery path would be very helpful, especially a documented way in Codex Desktop to re-run/reprovision the Windows Agent sandbox when this ACL state is encountered. The internal WindowsSandboxSetupStart path exists, but I could not establish a documented user-facing Desktop action that reliably invokes it for this case.
Follow-up with a more specific local reproduction from the same machine.
I was able to capture the transition in Codex's own Windows sandbox log. This now looks less like a repository/command-specific problem and more like a sandbox refresh / ACL lifecycle issue on .sandbox-bin.
Environment at the time of the captured failure:
Windows 11 25H2
OS build: 26200.9445
Codex Desktop: 26.908.4834.0
command runner observed in the log: codex-command-runner-0.154.0-alpha.6.2.exe
Timeline (local time, JST / UTC+9):
20:39:09.159
Codex starts a sandbox setup refresh:
The corresponding exec command then completes successfully at 20:39:14.071:
Script completed
Wall time 5.0 seconds
The next command begins only a few seconds later.
20:39:20.839
Codex starts another sandbox setup refresh.
20:39:20.870
That refresh fails immediately with:
helper_sandbox_lock_failed:
lock sandbox bin dir C:\Users\<user>\.codex\.sandbox-bin failed:
SetNamedSecurityInfoW sandbox dir failed: 5
20:39:20.874
The setup refresh exits with status 1.
The exact same failure occurs again at:
20:39:25.220
20:40:09.953
20:40:13.166
21:11:53.026
21:11:58.906
21:12:26.159
and continues afterward.
The successful command immediately before the failure was a normal read-only Get-Content operation.
The command that first failed was also a normal local inspection command (Git state / file hashes / file reads).
The immediate retry was only:
Get-Date
and it also failed before command execution with the same sandbox lock error.
So the failure does not appear to depend on repository contents or command complexity.
One additional warning occurs during the successful run:
hide users: failed to hide current user profile dir (C:\Users\Default):
SetFileAttributesW failed ... error 5
However, the command still completes successfully afterward, so this does not appear to be the immediate blocking failure.
The important observed transition is:
successful sandbox refresh
-> command runner copied into .sandbox-bin
-> command executes successfully
-> next sandbox refresh attempts to lock .sandbox-bin
-> SetNamedSecurityInfoW fails with ERROR_ACCESS_DENIED (5)
-> subsequent exec attempts keep failing the same way
This is consistent with a possible non-idempotent ACL/DACL refresh issue on .sandbox-bin, although I cannot confirm the root cause from the client side.
Additional timing: Codex Desktop had been updated earlier that evening from 26.903.9818.0 to 26.908.4834.0. I am not claiming the app update alone is the root cause, because one sandboxed command still succeeded after the update. The more specific trigger appears to be the transition between the successful refresh and the immediately following refresh.
The problem persists across:
Codex restart
Windows reboot
Windows app Repair
Windows app Reset
I have deliberately not changed the .sandbox-bin ACL manually or disabled the sandbox, to avoid modifying the security boundary before the underlying cause is understood.
If useful, I can provide a sanitized excerpt of C:\Users\<user>\.codex\.sandbox\sandbox.2026-09-12.log showing the successful refresh immediately followed by the failing refresh.
Additional reproducible diagnostic from Windows app 26.908.4834.0:
We isolated the minimum ACL right required to make the sandbox start. In the failing state, .codex\.sandbox-bin is ACL-protected (AreAccessRulesProtected=True), owner is BUILTIN\Administrators, and the ACL is:
SYSTEM: Modify, Synchronize
Administrators: Modify, Synchronize
current user: Modify, Synchronize
CodexSandboxUsers: ReadAndExecute, Synchronize
With that ACL, the next sandbox initialization fails with: helper_sandbox_lock_failed: ... SetNamedSecurityInfoW sandbox dir failed: 5.
Instead of granting Full Control, we added ONLY WRITE_DAC to the current user: icacls "$env:USERPROFILE\.codex\.sandbox-bin" /grant "DOMAIN\user:(WDAC)"
Get-Acl then showed an additional Allow ChangePermissions ACE. Without restarting Windows/app, a Codex task successfully performed two consecutive read-only file reads in the same execution.
Immediately afterward, Get-Acl showed that Codex/helper had removed the ChangePermissions ACE and restored the user to Modify only. A new Codex task then immediately failed again with helper_sandbox_lock_failed / SetNamedSecurityInfoW error 5.
Reproduction cycle:
ACL = Modify only -> sandbox initialization fails.
Add only WRITE_DAC -> sandbox initialization succeeds and task runs.
Codex/helper rewrites .sandbox-bin ACL and removes WRITE_DAC.
Next task -> sandbox initialization fails with error 5 again.
This strongly suggests a self-lockout in the Windows sandbox ACL hardening/refresh path: setup requires WRITE_DAC on .sandbox-bin, but the ACL it leaves behind removes that capability before the next refresh. Full Control is not required; WRITE_DAC alone is sufficient in this reproduction.
I am also experiencing this Windows sandbox initialization failure. It blocks ordinary local shell commands and the browser-reading/computer-use runtime.
Observed error (user path redacted):
helper_sandbox_lock_failed:
lock sandbox bin dir C:\Users\<user>\.codex\.sandbox-bin failed:
SetNamedSecurityInfoW sandbox dir failed: 5
The browser tool fails on await cua.getState() before inspecting any page. Diagnostics report that the Node kernel exits with code 1 and the sandbox error above. A separate minimal Node runtime test also fails, so the failure occurs before interacting with the target website. Resetting the browser runtime did not resolve it.
Read-only inspection of .sandbox-bin showed:
Owner: BUILTIN\Administrators
AreAccessRulesProtected: True
SYSTEM, Administrators and current user: Modify, Synchronize
CodexSandboxUsers: ReadAndExecute, Synchronize
No ACL, ownership or security-setting changes were made during this diagnosis.
Please use the feedback to correlate the diagnostics. A supported recovery procedure or a fix for the sandbox initialization issue would be appreciated.
I’m reproducing this failure in the VS Code extension, not just the desktop app.
Environment:
Windows 11 Pro, version 25H2, OS build 26200.9168
Extension: openai.chatgpt, version 26.908.40401
Native Windows / PowerShell
Error: helper_sandbox_lock_failed: lock sandbox bin dir C:\Users\[USER]\.codex\.sandbox-bin failed: SetNamedSecurityInfoW sandbox dir failed: 5
The initial administrator-approved setup logged successful firewall configuration and “setup provisioning binary completed.” The subsequent setup refresh failed with the error above.
Restarting VS Code and retrying did not resolve it. Running VS Code as administrator once allowed the setup warning to disappear, but after closing all windows and reopening normally, every tested command was blocked before execution:
Get-Location
git --no-optional-locks status --short
git log -2 --oneline
The session reported workspace-write with restricted network access, but sandbox initialization failed.
The folder owner is BUILTIN\Administrators. SYSTEM, Administrators, and my user have Modify/Synchronize; CodexSandboxUsers has ReadAndExecute/Synchronize.
I have not manually changed ACLs or ownership, selected the unelevated fallback, or enabled Full access. Please provide a supported repair that preserves the stronger native sandbox while running VS Code normally.
I can reproduce this on Windows Codex Desktop with the same failure, and it affects more than shell commands.
Observed behavior
The built-in patch tool can sometimes create a new temporary file, but then cannot reliably read or delete an existing .md file. The app reports that the same sandbox lock error causes the read/delete phase to be denied.
Built-in browser / computer-use initialization also fails.
This began within the last few days after a Codex desktop update. The app was repaired once through Windows Settings after that update, but the issue persists.
{
"code": "helper_sandbox_lock_failed",
"message": "lock sandbox bin dir C:\\Users\\<user>\\.codex\\.sandbox-bin failed: SetNamedSecurityInfoW sandbox dir failed: 5"
}
The contemporaneous sandbox log shows:
setup refresh: spawning ...\\codex-windows-sandbox-setup.exe
setup error: helper_sandbox_lock_failed: lock sandbox bin dir ...\\.sandbox-bin failed: SetNamedSecurityInfoW sandbox dir failed: 5
setup refresh: exited with status ExitStatus(1)
read-acl-only mode: applying read ACLs
read ACL run completed
The fallback to read-acl-only mode appears to explain why temporary-file creation can succeed but existing-file read/delete operations are later denied.
The affected .sandbox-bin directory is owned by BUILTIN\\Administrators. Its normal ACL matches the pattern reported here:
SYSTEM: Modify
Administrators: Modify
current Windows user: Modify
CodexSandboxUsers: ReadAndExecute
As an experiment, I granted the current user Full Control on only .sandbox-bin through an elevated UAC prompt. The grant succeeded, but Codex still reproduced the same SetNamedSecurityInfoW ... 5 setup failure and then reverted the effective current-user rule to Modify during its fallback flow. Therefore a one-off current-user ACL grant is not a durable workaround.
No project data was changed as part of the diagnosis.
Retested on September 19, 2026, at approximately 16:25 UTC after receiving a couple of app updates. The current installed app version is not yet verified.
Two consecutive attempts to open Google Search in the built-in browser failed:
trusted Node process exited unexpectedly; kernel reset, rerun your request
The second attempt followed the automatic kernel reset reported by the tool. Neither attempt returned page or tab state, so browser navigation and button interactions could not be tested.
A subsequent read-only attempt to retrieve the installed Codex app version also failed before command execution with the original error (user path redacted):
helper_sandbox_lock_failed: lock sandbox bin dir C:\Users\<user>\.codex\.sandbox-bin failed: SetNamedSecurityInfoW sandbox dir failed: 5
The original sandbox failure therefore remains reproducible. I cannot establish whether the browser runtime exit has the same root cause or is a separate issue.
No ACL, ownership, or security-setting changes were made during this retest. Could the team confirm whether the browser runtime symptom belongs in this issue and advise on a supported recovery or fix?
On 28 September 2026, Codex Desktop on Windows reproduced helper_sandbox_lock_failed when opening .codex/.sandbox-bin. Even read-only shell commands fail before execution.
Restarting the app and its sandbox service did not resolve the earlier failure. A temporary permission adjustment restored normal operation, but the problem returned later that day and interrupted an active workflow.
Current permissions and the trigger for this recurrence could not be re-verified because command execution is blocked. Please investigate and provide a supported, durable recovery procedure. The temporary recovery has not resolved the underlying problem.
Follow-up: targeted permission repair retained after a normal desktop restart.
On Windows 11, Codex Desktop 26.930.3930.0 still failed before launching even Get-Date with the elevated Windows sandbox selected:
helper_sandbox_lock_failed
SetNamedSecurityInfoW sandbox dir failed: 5
The existing .codex/.sandbox-bin directory was owned by BUILTIN\Administrators with protected inheritance. The interactive user had Modify/Synchronize but lacked ChangePermissions (WRITE_DAC). CodexSandboxUsers had ReadAndExecute/Synchronize.
An earlier attempt through the documented windowsSandbox/setupStart interface reported success, but the folder permissions remained unchanged and actual command execution still failed.
After saving the original security descriptor, a user-approved administrator process added only a non-inheriting ChangePermissions allow entry for the interactive user on the helper directory. Ownership, existing rules and inheritance protection were preserved; no Full Control grant or recursive manual permission edit was used.
Separate Get-Date and Get-Location calls then succeeded. Codex's normal refresh consolidated the user's entry into inheritable Modify/ChangePermissions/Synchronize. Other accounts' folder rules remained identical to the original; CodexSandboxUsers retained only ReadAndExecute/Synchronize on both the folder and the inspected helper executable.
After fully quitting and reopening the desktop app normally, both commands still succeeded separately. Commands used a dedicated CodexSandboxUsers account distinct from the interactive user, without administrator privileges. The repaired permission was retained and the folder descriptor matched its pre-restart state. The sandbox setting remained elevated.
This is a tested local workaround, not proof of a permanent fix or a comprehensive isolation assessment. No raw logs, account identifiers, configuration files or security descriptors are attached.
Could maintainers confirm this is the intended permission state and provide a supported migration/recovery path for existing helper directories lacking WRITE_DAC?
Retest on 7 October 2026: local shell commands now succeed, but two attempts to open LinkedIn through the in-app browser failed before page access. The retry reported windows sandbox failed: helper_unknown_error: setup refresh had errors. No permissions or sandbox settings were changed during this test. Is there a supported recovery procedure, or should this remaining browser failure be tracked separately?
Update — 18 October 2026: MXC-selected execution has allowed development to resume on the machine from my earlier reports.
The change was to select the MXC Windows sandbox and restart the app:
[windows]
sandbox = "mxc"
Explicit CLI launches with -c windows.sandbox=mxc were also used during testing. Since the switch on 16 October, local file operations and compilation/build work have been able to proceed, rather than every shell command failing before execution. On 18 October, ordinary PowerShell file reads and local checkpoint/archive operations also completed successfully.
Current OS version/build read from the registry: 25H2, 26200.9711. I have not re-verified the current Desktop package version because the package query was denied in the sandbox.
Important limits:
I have not switched back to the previous sandbox implementation to retest the original .sandbox-bin / WRITE_DAC failure. This is an update about a usable alternative path, not confirmation that the original defect is fixed.
The saved MXC setting alone is not independent proof of the effective backend of every app session. The positive observation is successful work after MXC selection, including explicit MXC CLI testing.
This is not a comprehensive isolation assessment or a claim that every workflow now works.
Thank you for the MXC path—it has been useful in restoring practical development work. Is there any additional diagnostic information that would help distinguish this improvement from a fix to the legacy sandbox issue?
I encountered the same Windows sandbox setup failure on the Codex desktop app.
Environment
Windows 11 Pro, build 26200.9445 (25H2)
Codex MSIX package version: 26.1013.4894.0
Error helper_sandbox_lock_failed SetNamedSecurityInfoW sandbox dir failed: 5
The existing %USERPROFILE%\.codex\.sandbox-bin directory was owned by BUILTIN\Administrators, had inheritance disabled, and had explicit Modify access for SYSTEM, Administrators, and my user, with ReadAndExecute for CodexSandboxUsers. Running PowerShell elevated did not resolve the setup failure.
Workaround that made the setup warning disappear
I fully closed Codex, renamed .sandbox-bin to a timestamped backup (did not delete it), relaunched Codex, and retried setup. The “Windows setup incomplete” prompt no longer appeared afterward.
This suggests the setup flow cannot reliably recover from an existing helper directory ACL/security-descriptor state. It would be better if the helper detected/repaired this state itself, or provided a clear recovery path, rather than requiring users to manually rename a security-sensitive directory. I have not yet established whether this fully prevents recurrence, but the workaround is reproducible in principle and avoids deleting the original directory.
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 Sep 13, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
butayamada commentedon Sep 14, 2026
I can reproduce this on the same Codex App build (26.908.40834) on Windows.
Observed behavior:
helper_sandbox_lock_failed: lock sandbox bin dir C:\Users\<user>\.codex\.sandbox-bin failed: SetNamedSecurityInfoW sandbox dir failed: 5Read-only ACL inspection of
C:\Users\<user>\.codex\.sandbox-binshowed:BUILTIN\AdministratorsCodexSandboxUsers,SYSTEM,Administrators, and the current user.WRITE_DAC). No ACL/ownership changes were made.This is notable because the current Windows sandbox implementation appears to expect the real-user mask on
.sandbox-binto includeWRITE_DACso the unelevated refresh can reapply the protected DACL.I have intentionally not tried manual ACL repair, sandbox-directory deletion, Defender/security-control changes, privilege escalation, or alternate-shell bypasses.
A supported recovery path would be very helpful, especially a documented way in Codex Desktop to re-run/reprovision the Windows Agent sandbox when this ACL state is encountered. The internal
WindowsSandboxSetupStartpath exists, but I could not establish a documented user-facing Desktop action that reliably invokes it for this case.butayamada commentedon Sep 14, 2026
Follow-up with a more specific local reproduction from the same machine.
I was able to capture the transition in Codex's own Windows sandbox log. This now looks less like a repository/command-specific problem and more like a sandbox refresh / ACL lifecycle issue on
.sandbox-bin.Environment at the time of the captured failure:
codex-command-runner-0.154.0-alpha.6.2.exeTimeline (local time, JST / UTC+9):
20:39:09.159
Codex starts a sandbox setup refresh:
20:39:09.726
The refresh completes successfully:
20:39:09.743 - 20:39:09.750
Read ACL handling also completes:
20:39:09.803 - 20:39:09.813
Codex validates and recopies the command runner into:
The corresponding exec command then completes successfully at 20:39:14.071:
The next command begins only a few seconds later.
20:39:20.839
Codex starts another sandbox setup refresh.
20:39:20.870
That refresh fails immediately with:
20:39:20.874
The setup refresh exits with status 1.
The exact same failure occurs again at:
and continues afterward.
The successful command immediately before the failure was a normal read-only
Get-Contentoperation.The command that first failed was also a normal local inspection command (Git state / file hashes / file reads).
The immediate retry was only:
and it also failed before command execution with the same sandbox lock error.
So the failure does not appear to depend on repository contents or command complexity.
One additional warning occurs during the successful run:
However, the command still completes successfully afterward, so this does not appear to be the immediate blocking failure.
The important observed transition is:
This is consistent with a possible non-idempotent ACL/DACL refresh issue on
.sandbox-bin, although I cannot confirm the root cause from the client side.Additional timing: Codex Desktop had been updated earlier that evening from
26.903.9818.0to26.908.4834.0. I am not claiming the app update alone is the root cause, because one sandboxed command still succeeded after the update. The more specific trigger appears to be the transition between the successful refresh and the immediately following refresh.The problem persists across:
I have deliberately not changed the
.sandbox-binACL manually or disabled the sandbox, to avoid modifying the security boundary before the underlying cause is understood.If useful, I can provide a sanitized excerpt of
C:\Users\<user>\.codex\.sandbox\sandbox.2026-09-12.logshowing the successful refresh immediately followed by the failing refresh.kangx584 commentedon Sep 15, 2026
I am seeing the same
helper_sandbox_lock_failed/ Windows error 5 failure on the latest Codex Desktop for Windows.Environment
Exact failure
codex doctorreports:Manual elevated sandbox setup also fails:
The Codex Desktop Finish Windows setup flow also fails.
Rebooting Windows did not resolve the issue.
Workspace ownership
The affected project itself appears normal:
Sandbox accounts
Both sandbox accounts exist and are enabled:
Both are members of
CodexSandboxUsers..sandbox-binownership and ACLicaclsconfirms:So the expected ACLs appear to already be present, but the sandbox setup still fails while attempting to apply security information.
Other diagnostics
takeown, deleted.sandbox-bin, or manually deleted/recreated the sandbox accounts..gitdirectory are owned by my normal Windows user, not byCodexSandboxOfflineorCodexSandboxOnline.This appears consistent with reports where
.sandbox-binalready has the expected ACLs but the refresh/setup path still returns Windows error 5.Please let me know if any additional diagnostic output would be useful. I can provide a redacted
codex doctor --jsonreport if needed.fox8329td commentedon Sep 15, 2026
Additional reproducible diagnostic from Windows app 26.908.4834.0:
We isolated the minimum ACL right required to make the sandbox start. In the failing state,
.codex\.sandbox-binis ACL-protected (AreAccessRulesProtected=True), owner isBUILTIN\Administrators, and the ACL is:With that ACL, the next sandbox initialization fails with:
helper_sandbox_lock_failed: ... SetNamedSecurityInfoW sandbox dir failed: 5.Instead of granting Full Control, we added ONLY
WRITE_DACto the current user:icacls "$env:USERPROFILE\.codex\.sandbox-bin" /grant "DOMAIN\user:(WDAC)"Get-Aclthen showed an additionalAllow ChangePermissionsACE. Without restarting Windows/app, a Codex task successfully performed two consecutive read-only file reads in the same execution.Immediately afterward,
Get-Aclshowed that Codex/helper had removed theChangePermissionsACE and restored the user to Modify only. A new Codex task then immediately failed again withhelper_sandbox_lock_failed/ SetNamedSecurityInfoW error 5.Reproduction cycle:
.sandbox-binACL and removes WRITE_DAC.This strongly suggests a self-lockout in the Windows sandbox ACL hardening/refresh path: setup requires WRITE_DAC on
.sandbox-bin, but the ACL it leaves behind removes that capability before the next refresh. Full Control is not required; WRITE_DAC alone is sufficient in this reproduction.DarioScibetta commentedon Sep 15, 2026
I am also experiencing this Windows sandbox initialization failure. It blocks ordinary local shell commands and the browser-reading/computer-use runtime.
Observed error (user path redacted):
The browser tool fails on
await cua.getState()before inspecting any page. Diagnostics report that the Node kernel exits with code 1 and the sandbox error above. A separate minimal Node runtime test also fails, so the failure occurs before interacting with the target website. Resetting the browser runtime did not resolve it.Read-only inspection of
.sandbox-binshowed:No ACL, ownership or security-setting changes were made during this diagnosis.
In-app feedback ID:
019e4a0b-6501-7b13-9531-2094a70d00e7Please use the feedback to correlate the diagnostics. A supported recovery procedure or a fix for the sandbox initialization issue would be appreciated.
Ray-iTech commentedon Sep 15, 2026
I’m reproducing this failure in the VS Code extension, not just the desktop app.
Environment:
Error:
helper_sandbox_lock_failed: lock sandbox bin dir C:\Users\[USER]\.codex\.sandbox-bin failed: SetNamedSecurityInfoW sandbox dir failed: 5The initial administrator-approved setup logged successful firewall configuration and “setup provisioning binary completed.” The subsequent setup refresh failed with the error above.
Restarting VS Code and retrying did not resolve it. Running VS Code as administrator once allowed the setup warning to disappear, but after closing all windows and reopening normally, every tested command was blocked before execution:
Get-Locationgit --no-optional-locks status --shortgit log -2 --onelineThe session reported workspace-write with restricted network access, but sandbox initialization failed.
The folder owner is BUILTIN\Administrators. SYSTEM, Administrators, and my user have Modify/Synchronize; CodexSandboxUsers has ReadAndExecute/Synchronize.
I have not manually changed ACLs or ownership, selected the unelevated fallback, or enabled Full access. Please provide a supported repair that preserves the stronger native sandbox while running VS Code normally.
LeLiuUnimelb commentedon Sep 16, 2026
I can reproduce this on Windows Codex Desktop with the same failure, and it affects more than shell commands.
Observed behavior
.mdfile. The app reports that the same sandbox lock error causes the read/delete phase to be denied.Local evidence
Current copied runner:
%USERPROFILE%\\.codex\\.sandbox\\setup_error.json:{ "code": "helper_sandbox_lock_failed", "message": "lock sandbox bin dir C:\\Users\\<user>\\.codex\\.sandbox-bin failed: SetNamedSecurityInfoW sandbox dir failed: 5" }The contemporaneous sandbox log shows:
The fallback to
read-acl-only modeappears to explain why temporary-file creation can succeed but existing-file read/delete operations are later denied.The affected
.sandbox-bindirectory is owned byBUILTIN\\Administrators. Its normal ACL matches the pattern reported here:SYSTEM: ModifyAdministrators: ModifyCodexSandboxUsers: ReadAndExecuteAs an experiment, I granted the current user Full Control on only
.sandbox-binthrough an elevated UAC prompt. The grant succeeded, but Codex still reproduced the sameSetNamedSecurityInfoW ... 5setup failure and then reverted the effective current-user rule to Modify during its fallback flow. Therefore a one-off current-user ACL grant is not a durable workaround.No project data was changed as part of the diagnosis.
zhenglitian commentedon Sep 16, 2026
delete C:\Users\Zheng.codex.sandbox-bin
right click create folder .sandbox-bin
but .sandbox-bin is also empty ,it's normally?
DarioScibetta commentedon Sep 19, 2026
Retested on September 19, 2026, at approximately 16:25 UTC after receiving a couple of app updates. The current installed app version is not yet verified.
Two consecutive attempts to open Google Search in the built-in browser failed:
Both returned:
The second attempt followed the automatic kernel reset reported by the tool. Neither attempt returned page or tab state, so browser navigation and button interactions could not be tested.
A subsequent read-only attempt to retrieve the installed Codex app version also failed before command execution with the original error (user path redacted):
The original sandbox failure therefore remains reproducible. I cannot establish whether the browser runtime exit has the same root cause or is a separate issue.
No ACL, ownership, or security-setting changes were made during this retest. Could the team confirm whether the browser runtime symptom belongs in this issue and advise on a supported recovery or fix?
Migbal commentedon Sep 28, 2026
On 28 September 2026, Codex Desktop on Windows reproduced
helper_sandbox_lock_failedwhen opening.codex/.sandbox-bin. Even read-only shell commands fail before execution.Restarting the app and its sandbox service did not resolve the earlier failure. A temporary permission adjustment restored normal operation, but the problem returned later that day and interrupted an active workflow.
Current permissions and the trigger for this recurrence could not be re-verified because command execution is blocked. Please investigate and provide a supported, durable recovery procedure. The temporary recovery has not resolved the underlying problem.
hjachoe commentedon Oct 5, 2026
Follow-up: targeted permission repair retained after a normal desktop restart.
On Windows 11, Codex Desktop 26.930.3930.0 still failed before launching even Get-Date with the elevated Windows sandbox selected:
helper_sandbox_lock_failed
SetNamedSecurityInfoW sandbox dir failed: 5
The existing .codex/.sandbox-bin directory was owned by BUILTIN\Administrators with protected inheritance. The interactive user had Modify/Synchronize but lacked ChangePermissions (WRITE_DAC). CodexSandboxUsers had ReadAndExecute/Synchronize.
An earlier attempt through the documented windowsSandbox/setupStart interface reported success, but the folder permissions remained unchanged and actual command execution still failed.
After saving the original security descriptor, a user-approved administrator process added only a non-inheriting ChangePermissions allow entry for the interactive user on the helper directory. Ownership, existing rules and inheritance protection were preserved; no Full Control grant or recursive manual permission edit was used.
Separate Get-Date and Get-Location calls then succeeded. Codex's normal refresh consolidated the user's entry into inheritable Modify/ChangePermissions/Synchronize. Other accounts' folder rules remained identical to the original; CodexSandboxUsers retained only ReadAndExecute/Synchronize on both the folder and the inspected helper executable.
After fully quitting and reopening the desktop app normally, both commands still succeeded separately. Commands used a dedicated CodexSandboxUsers account distinct from the interactive user, without administrator privileges. The repaired permission was retained and the folder descriptor matched its pre-restart state. The sandbox setting remained elevated.
This is a tested local workaround, not proof of a permanent fix or a comprehensive isolation assessment. No raw logs, account identifiers, configuration files or security descriptors are attached.
Could maintainers confirm this is the intended permission state and provide a supported migration/recovery path for existing helper directories lacking WRITE_DAC?
DarioScibetta commentedon Oct 7, 2026
Retest on 7 October 2026: local shell commands now succeed, but two attempts to open LinkedIn through the in-app browser failed before page access. The retry reported
windows sandbox failed: helper_unknown_error: setup refresh had errors. No permissions or sandbox settings were changed during this test. Is there a supported recovery procedure, or should this remaining browser failure be tracked separately?butayamada commentedon Oct 18, 2026
Update — 18 October 2026: MXC-selected execution has allowed development to resume on the machine from my earlier reports.
The change was to select the MXC Windows sandbox and restart the app:
Explicit CLI launches with
-c windows.sandbox=mxcwere also used during testing. Since the switch on 16 October, local file operations and compilation/build work have been able to proceed, rather than every shell command failing before execution. On 18 October, ordinary PowerShell file reads and local checkpoint/archive operations also completed successfully.Current OS version/build read from the registry: 25H2, 26200.9711. I have not re-verified the current Desktop package version because the package query was denied in the sandbox.
Important limits:
.sandbox-bin/WRITE_DACfailure. This is an update about a usable alternative path, not confirmation that the original defect is fixed.Thank you for the MXC path—it has been useful in restoring practical development work. Is there any additional diagnostic information that would help distinguish this improvement from a fix to the legacy sandbox issue?
ckvupu0 commentedon Oct 20, 2026
I encountered the same Windows sandbox setup failure on the Codex desktop app.
Environment
Error
helper_sandbox_lock_failedSetNamedSecurityInfoW sandbox dir failed: 5The existing
%USERPROFILE%\.codex\.sandbox-bindirectory was owned byBUILTIN\Administrators, had inheritance disabled, and had explicit Modify access for SYSTEM, Administrators, and my user, with ReadAndExecute forCodexSandboxUsers. Running PowerShell elevated did not resolve the setup failure.Workaround that made the setup warning disappear
I fully closed Codex, renamed
.sandbox-binto a timestamped backup (did not delete it), relaunched Codex, and retried setup. The “Windows setup incomplete” prompt no longer appeared afterward.This suggests the setup flow cannot reliably recover from an existing helper directory ACL/security-descriptor state. It would be better if the helper detected/repaired this state itself, or provided a clear recovery path, rather than requiring users to manually rename a security-sensitive directory. I have not yet established whether this fully prevents recurrence, but the workaround is reproducible in principle and avoids deleting the original directory.