Repository navigation
[Windows][Codex App] Sandbox setup fails in elevated and unelevated modes with helper_sandbox_lock_failed #49025
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Powered by Codex & OWL Versão 26.924.22138
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Windows 11
What issue are you seeing?
No campo “What issue are you seeing?”, cola isto:
On Windows 11, the Codex native Windows sandbox setup fails in both elevated and unelevated modes.
I tested elevated normally and also with ChatGPT Desktop launched as Administrator. I also changed the configuration to:
[windows]
sandbox = "unelevated"
and restarted the app, but the setup still fails with:
A configuração do Windows não foi concluída / Configuração parada
The logs show:
sandbox setup required: sandbox setup marker missing or incompatible
and:
helper_sandbox_lock_failed: lock sandbox bin dir \?\C:\Users\Rui Sousa.codex.sandbox-bin failed: open directory \?\C:\Users\Rui Sousa.codex.sandbox-bin
In another setup attempt, the log shows that sandbox users and WFP/firewall configuration completed successfully before failing on .sandbox-bin:
WFP setup succeeded for CodexSandboxOffline with 12 installed filters
Environment:
- Windows 11 25H2
- OS build 26200.9550
- Antivirus: Microsoft Defender only
- Main development project: C# WPF application for Windows
Feedback Session ID:
01a0e7e5-d721-7023-ae5a-95fa76b77029
I would like to restore the native Windows sandbox if possible, rather than move the workflow permanently to WSL2.
What steps can reproduce the bug?
No campo “What steps can reproduce the bug?”, cola isto:
-
Open ChatGPT Desktop on Windows 11.
-
Open Codex.
-
Use the native Windows sandbox in elevated mode:
[windows]
sandbox = "elevated" -
Click the option to complete/retry Windows sandbox setup and approve UAC/admin when prompted.
-
The setup fails with “A configuração do Windows não foi concluída / Configuração parada”.
-
Close ChatGPT Desktop.
-
Change the configuration to:
[windows]
sandbox = "unelevated" -
Restart ChatGPT Desktop normally and open Codex again.
-
Retry Windows sandbox setup.
-
The setup fails again with the same “Configuração parada” state.
Reproduced consistently on Windows 11 25H2, OS build 26200.9550.
Logs from the failed attempts contain:
sandbox setup required: sandbox setup marker missing or incompatible
and
helper_sandbox_lock_failed: lock sandbox bin dir \?\C:\Users\Rui Sousa.codex.sandbox-bin failed: open directory \?\C:\Users\Rui Sousa.codex.sandbox-bin
What is the expected behavior?
The Windows sandbox setup should complete successfully in at least one supported mode (elevated or unelevated).
After setup completes, Codex should be able to run local commands inside the sandbox without showing “Windows setup was not completed / Configuration stopped” and without requiring execution outside the sandbox.
The setup should also create and recognize a valid sandbox setup marker and allow access to the required .codex.sandbox-bin directory.
Additional information
No campo “Additional information”, cola isto:
Additional diagnostics:
- Feedback Session ID: 01a0e7e5-d721-7023-ae5a-95fa76b77029
- Windows 11 25H2, OS build 26200.9550
- Antivirus/security software: Microsoft Defender only
- The issue occurs in both elevated and unelevated sandbox modes
- elevated was also tested with ChatGPT Desktop launched as Administrator
- The setup log shows sandbox users and WFP/firewall configuration succeeding before the failure:
WFP setup succeeded for CodexSandboxOffline with 12 installed filters - The failure then occurs at:
helper_sandbox_lock_failed: lock sandbox bin dir \?\C:\Users\Rui Sousa.codex.sandbox-bin failed: open directory \?\C:\Users\Rui Sousa.codex.sandbox-bin - Another log from the same day contains:
sandbox setup required: sandbox setup marker missing or incompatible - I also have a log from the previous day, when Codex was working normally, for comparison.
- My main local development workflow is a C# WPF application on Windows, so restoring the native Windows sandbox would be preferable to moving permanently to WSL2.
- I have not manually modified ACLs or deleted/recreated .codex.sandbox-bin.
- I am not sharing anything from CODEX_HOME/.sandbox-secrets/.
- The attached logs were sanitized only to remove the local Windows username and machine-specific user SID. Diagnostic content was preserved.
sandbox-2b8c60eb36782959_sanitized.log
sandbox-adebde5a420a7096_sanitized.log
Activity
ruimpsousa-jpg commentedon Sep 28, 2026
Update: after closing ChatGPT Desktop, I renamed C:\Users<USER>.codex.sandbox-bin to .sandbox-bin.bak and restarted the app. Codex recreated the sandbox environment and local commands started working again.
Current configuration:
[windows] sandbox = "unelevated"
Git commands now execute normally inside Codex.
This appears to be a working workaround for the helper_sandbox_lock_failed issue on my system.
zengweiyi1223 commentedon Sep 30, 2026
Independent reproduction on 2026-09-30 with the same
helper_sandbox_lock_failed/open directorysignature.Environment:
26.928.2636.0(Microsoft Store package)10.0.26200, x64, Chinese localeelevatedObserved behavior:
Sanitized
setup_error.json:{ "code": "helper_sandbox_lock_failed", "message": "lock sandbox bin dir <USERPROFILE>\\.codex\\.sandbox-bin failed: open directory <USERPROFILE>\\.codex\\.sandbox-bin" }Relevant sanitized log sequence:
Additional checks:
.sandbox-binexists and is readable in Explorer.sandbox-binreturned no holder.setup_marker.jsonremains empty after the failed setup..sandbox-bin/.sandbox-secretsdeletion, ownership takeover, broad ACL grant, or Full Access workaround was attempted.This appears to match the report exactly. Please let me know if a fully sanitized log attachment or additional supported diagnostic is useful.
Hidesc commentedon Sep 30, 2026
Adding another reproduction with a more specific timeline and a note about the error's meaning.
Environment: Windows 11 Home x64, build
10.0.26300; Microsoft Store packageOpenAI.Codex 26.928.2636.0; command-runner0.159.2;workspace-writewith the elevated Windows sandbox.Even a harmless read-only PowerShell command fails before it starts:
sandbox provisioning failed/exec-server rejected request (-32603). The UI reports incomplete Windows setup; clicking reconfigure has no visible effect. Updating the app, restarting it, and a full Windows reboot have not resolved this.Diagnostic signatures (paths sanitized):
sandbox setup required: sandbox setup marker missing or incompatiblehelper_sandbox_lock_failed: lock sandbox bin dir %USERPROFILE%\.codex\.sandbox-bin failed: open directory %USERPROFILE%\.codex\.sandbox-binTimeline on 2026-09-30, UTC+8:
[]to[7897].2026-09-30T13:36:42.2608526Zin UTC.This is an observed sequence, not evidence that the port change caused the failure.
.sandbox-binexists and is readable, contains the Codex executable/runner, andsetup_marker.jsonis 0 bytes.In the official
0.159.2source reviewed for this report, “lock sandbox bin dir” is an ACL-lockdown operation; the message does not establish a mutex/process-lock conflict. TheProvisionOnlypath opens the directory withREAD_CONTROL | WRITE_DAC, and the wrapper may omit the inner cause. No underlying Win32 error code is present in the observed error.No manual ACL/marker changes or directory deletion have been performed, and neither Full Access nor unelevated mode has been enabled. Is there a safe supported recovery that preserves the elevated sandbox, or a specific additional diagnostic maintainers need to identify the failing Windows operation?
spidikor commentedon Oct 1, 2026
Quick update for the same
helper_sandbox_lock_failed/open directoryfailure: a narrow permissions workaround worked locally.On Codex Desktop 26.928.2636.0 / Windows 11 Home, build 26300, the service was running as LocalSystem, while SYSTEM had Modify but lacked
WRITE_DACon the protected.sandbox-bindirectory.After saving the DACL and checking that the path wasn't redirected, I added only SYSTEM's
WRITE_DAC, additively on that directory itself, and retried the normal setup. Actual sandbox PowerShell commands then exited 0, and workspace/ACL reads worked! Ownership, Administrators' rights and the sandbox user group's rights stayed unchanged.Full anonymized steps, backup/path checks, and source comparison.
The catch: Codex removed the temporary permission afterward. Shell startup and reads were verified; workspace writes, an upgrade and another provisioning cycle weren't. So this is a temporary workaround for the matching LocalSystem/ACL case, with recurrence still possible.
Pronto-Sage commentedon Oct 1, 2026
Additional reproduction: shell execution and file editing unavailable
I’m seeing a matching failure in a Linux execution environment. Basic commands such as
pwd,true, and source-file reads fail before the requested command executes:Direct
apply_patchoperations also fail with:I cannot confirm whether the patch failure has exactly the same underlying cause.
Observed diagnostics
workspace-write, with restricted network access and approval policynever./tmp./bin/bashand/bin/shfail.Impact
Codex cannot inspect source files, edit them, run tests, or verify development changes. Repeated requests produce the same executor failure without further repository work.
This establishes an execution-tool failure, not an application, repository, or deployment defect.
Expected behavior
Workspace commands and edits should work within the configured permissions. If sandbox initialization fails, Codex should provide an actionable diagnostic and a supported recovery path rather than repeatedly retrying operations that cannot start.
anye2627 commentedon Oct 1, 2026
Confirmed recovery on October 1, 2026, with the setup helper from package OpenAI.Codex_26.928.3736.0.
Process Monitor captured codex-windows-sandbox-setup.exe running as SYSTEM at System integrity. Opening the .sandbox-bin directory failed with ACCESS DENIED while requesting READ_CONTROL | WRITE_DAC. SYSTEM had Modify permission but lacked Change permissions.
After backing up the original directory ACL, I added a separate Allow entry for SYSTEM with only Change permissions, scoped to This folder only. Existing entries, ownership, and inheritance were left unchanged; no Full Control grant was added.
Retrying the normal Windows setup then succeeded. Get-Date also executed successfully in the previously blocked Codex task.
This independently corroborates the narrowly scoped workaround for this specific permission mismatch. We have not verified whether the added permission survives setup. Other reports indicate it may be removed again, so this should not be treated as a permanent fix.