Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.1027.3384.0
What subscription do you have?
ChatGPT Prolite
What platform is your computer?
Windows 10 Enterprise 22H2 (Build 19045), x64
What issue are you seeing?
Codex for Windows repeatedly displays "Finish Windows setup to continue" and fails to initialize its elevated sandbox.
Environment:
- Codex App: 26.1027.3384.0
- OS: Windows 10 Enterprise 22H2, build 19045, x64
- Configuration: [windows] sandbox = "elevated"
Observed sandbox logs:
WFP setup succeeded for CodexSandboxOffline with 12 installed filters
codex-windows-sandbox-bin failed: open directory ...\.codex\.sandbox-bin: NtCreateFile: os error 5
setup error: helper_sandbox_lock_failed
sandbox setup required: sandbox setup marker missing or incompatible
Investigation with Microsoft Process Monitor:
- Process: codex-windows-sandbox-setup.exe
- Account: NT AUTHORITY\SYSTEM
- Integrity: System
- Operation: CreateFile
- Target: %USERPROFILE%.codex.sandbox-bin
- Result: ACCESS DENIED
- Desired Access included Read Control and Write DAC.
The sandbox accounts and CodexSandboxUsers group were present, and the directory ACL passed verification. The directory granted SYSTEM Modify (M), but not WRITE_DAC.
Verified workaround (run from elevated PowerShell):
icacls "$env:USERPROFILE\.codex\.sandbox-bin" /grant "*S-1-5-18:(WDAC)"After granting SYSTEM WRITE_DAC on the directory, the Windows setup failure disappeared.
Expected behavior: The Codex Windows sandbox provisioning process should establish or validate the permissions required for initialization without manual ACL changes.
The precise reason the original ACL lacked WRITE_DAC is unknown. Please investigate whether installation, upgrading, or sandbox reprovisioning can leave this directory with insufficient permissions.
What steps can reproduce the bug?
-
Install Codex for Windows version
26.1027.3384.0on Windows 10 Enterprise 22H2 (Build 19045, x64). -
Configure the Windows sandbox mode in
~/.codex/config.toml:[windows] sandbox = "elevated"
-
Launch Codex and attempt to complete the Windows sandbox setup.
-
Codex repeatedly displays "Finish Windows setup to continue" and fails to initialize the sandbox.
-
Inspect the sandbox logs. The following errors appear:
codex-windows-sandbox-bin failed: NtCreateFile: os error 5 setup error: helper_sandbox_lock_failed -
Use Microsoft Process Monitor to inspect the failed operation:
- Process:
codex-windows-sandbox-setup.exe - User:
NT AUTHORITY\SYSTEM - Integrity: System
- Operation:
CreateFile - Path:
%USERPROFILE%\.codex\.sandbox-bin - Result:
ACCESS DENIED - Requested access includes
WRITE_DAC.
- Process:
-
Verify that the directory ACL grants SYSTEM Modify (
M) permission but notWRITE_DAC.
The original ACL configuration could not be reproduced from a clean installation. These steps describe the observed failure on the affected system.
What is the expected behavior?
Codex should successfully initialize the Windows elevated sandbox without requiring manual modifications to filesystem permissions.
The sandbox setup process should automatically establish or validate the required ACL permissions for %USERPROFILE%\.codex\.sandbox-bin.
If the required permissions are missing, the setup process should either repair them safely or provide a clear diagnostic message instead of repeatedly displaying "Finish Windows setup to continue".
Additional information
Root Cause Investigation and Verified Workaround
The issue was investigated using Windows PowerShell and Microsoft Sysinternals Process Monitor.
Confirmed findings:
- Both
CodexSandboxOfflineandCodexSandboxOnlineaccounts existed and were enabled. - Both accounts belonged to
CodexSandboxUsers. - The directory ACL passed
icacls /verify. - Windows Filtering Platform (WFP) setup completed successfully.
- The sandbox setup executable was running as
NT AUTHORITY\SYSTEMwith System integrity. - Process Monitor captured an
ACCESS DENIEDresult when the setup executable requestedWRITE_DACaccess to.sandbox-bin.
Verified workaround:
Running the following command in an elevated PowerShell session resolved the issue:
icacls "$env:USERPROFILE\.codex\.sandbox-bin" /grant "*S-1-5-18:(WDAC)"After granting WRITE_DAC to SYSTEM, the Windows sandbox setup failure disappeared.
Suggested investigation:
The original directory ACL granted SYSTEM Modify (M) permission, which does not include WRITE_DAC.
This appears to be a permissions mismatch between the sandbox provisioning process and the ACL applied to .sandbox-bin.
The exact cause of the original ACL configuration remains unknown. It may be worth investigating whether installation, application updates, or sandbox reprovisioning can leave this directory without the required permissions.
This workaround modifies a security-sensitive directory ACL and should not be considered an official general-purpose fix.
Activity
steffenz190-arch commentedon Nov 6, 2026
Additional reproducible report from an affected Windows 10 22H2 (19045), x64 user of the ChatGPT desktop app (Work/Codex), observed on 2026-11-06.
Observed behavior
%USERPROFILE%\.codex\.sandbox\setup_error.jsoncontained:{ "code": "helper_sandbox_lock_failed", "message": "lock sandbox bin dir \\?\\%USERPROFILE%\\.codex\\.sandbox-bin failed: open directory ...: NtCreateFile: Zugriff verweigert (os error 5)" }deny_read_acl_state.jsoncontained{"principals": {}}, without further diagnostic context.ACL evidence
icaclsoutput for%USERPROFILE%\.codex\.sandbox-binshowedNT AUTHORITY\SYSTEM:(M)but not(WDAC); the interactive Windows account had(M,WDAC).icacls ... /grant "*S-1-5-18:(WDAC)"from an elevated prompt, and confirmedNT AUTHORITY\SYSTEM:(WDAC)appeared afterward. The setup failure banner persisted.Other attempts (none fixed it)
26.1105.12137).%USERPROFILE%\.codex\.sandbox-binwhile the app was closed, to force regeneration.%USERPROFILE%\.codex\.sandboxwhile the app was closed, to reset saved setup state.Important distinction: the exact
helper_sandbox_lock_failederror is confirmed from the initial log. We have not confirmed a newly generated post-reset error log, so the later failure may have a different internal cause.Could maintainers investigate why setup or reprovisioning remains broken even after the previously documented
SYSTEM:(WDAC)workaround, and identify a supported lasting fix/diagnostic procedure? A user-facing exact failure reason would be particularly helpful. Further blind ACL changes, antivirus disablement, or deleting user configuration should not be necessary.This is a follow-up to this issue, not a claim that a single underlying cause has been conclusively identified. Private paths, names and credentials have deliberately been omitted.
steffenz190-arch commentedon Nov 6, 2026
Follow-up to the report posted earlier today (2026-11-06): cross-model UI behavior now confirmed by the affected user.
The same Windows sandbox initialization/setup error is shown when using Astra, not just Sol/Codex. In the Astra interface, the user can select "Full access" ("Vollzugriff"), but the choice does not persist or take effect: the UI allows clicking the option while the effective permission state remains unchanged. The user reports the same persistent Windows setup failure across these execution modes.
This suggests that the issue may affect a shared Windows setup/permission-state component, rather than a particular reasoning model or task prompt. This is an inference, not a verified root cause. No fresh post-reset
setup_error.jsonwas captured yet.For maintainers: please also investigate (1) why selecting permission modes does not take effect when Windows setup has failed, (2) whether the UI should explicitly disable or explain unavailable modes, and (3) whether Astra and Codex share the failing setup dependency. No further system-ACL changes or unsafe workarounds have been attempted.
manhmeoipad-a11y commentedon Nov 7, 2026
I'm also encountering Windows sandbox initialization errors:
helper_sandbox_lock_failedNtCreateFile: access denied (os error 5) on.sandbox-binsandbox setup marker missing or incompatibleI have restarted the app and Windows, and checked for updates. The app reports that it is up to date, but the problem persists. No Windows setup banner is shown, so I cannot retry setup from that banner.
Feedback ID:
01a1b121-72de-7014-9ab1-5170c370902bCould you advise on a supported way to recover or retry the sandbox setup?
robbyatbln commentedon Nov 10, 2026
I can reproduce this on Windows 11 with the ChatGPT desktop app (Codex package
OpenAI.Codex 26.1103.7773.0, x64). RunningGet-Locationfrom a local Codex chat fails before PowerShell starts. Restarting the app and opening a new chat did not resolve it.helper_sandbox_lock_failed,NtCreateFileaccess denied (Windows error 5), on%USERPROFILE%\.codex\.sandbox-bin.codex-windows-sandbox-setup.exeruns asNT AUTHORITY\SYSTEMwith System integrity.CreateFileon that directory requestsRead ControlandWrite DACand returnsACCESS DENIED.icaclsshowsSYSTEMhas(M), the interactive account has(M,WDAC), andCodexSandboxUsershas(RX). No manual ACL changes were made.Can you confirm which Windows desktop build includes the provisioning fix from #59745?
bamboojuice8-bit commentedon Nov 10, 2026
Additional Windows 10 report, with a distinction between connected and local execution.
helper_sandbox_lock_failed,NtCreateFile: Access is denied (os error 5), on%USERPROFILE%\.codex\.sandbox-bin.0x1301BF, withoutWRITE_DAC, on that protected directory.docker version, returning client/server version 29.9.3. This does not verify the failing connected path.Important recovery-state caveat: On November 10, a custom local repair script (not an upstream Codex repair command) attempted one directory-only SYSTEM
WRITE_DACaddition and returnedACL_WRITE_ATTEMPTED_UNVERIFIED/IOException: Post-write verification failed.Subsequent read-only comparison found the intended DACL bytes and ACE order, unchanged owner/group and directory identity, but descriptor control changed from0x9404to0x9004:SE_DACL_AUTO_INHERITEDcleared whileSE_DACL_PROTECTEDremained. The custom rollback does not accept this intermediate state. No successful connected-path retest or recovery is claimed, and this script outcome is not being attributed to upstream Codex.PR #59745 is merged, but we have not verified an installed desktop build containing it. Could maintainers identify the desktop build carrying the fix and the supported recovery path for an installation in this intermediate ACL state, without further blind permission changes?
Personal paths, account/device identifiers, raw logs and private project details are omitted.
moffcoVRC commentedon Nov 13, 2026
Additional Windows 10 recurrence report — November 13, 2026
Adding the prepared English report here to avoid opening another issue for the same error signature. This adds a successful official elevated setup → verified PC reboot and normal read/write → next-day recurrence sequence. The same MSIX version is also reported in #61154; recurring failures are discussed in #50520. A shared root cause remains a hypothesis for this installation.
Report date: 2026-11-13. All event times below are JST (UTC+09:00).
Summary and impact
The desktop app's "Approve for me" setting reverts to "Ask for approval", and ordinary sandboxed commands fail before the requested command starts. Official UAC-elevated setup temporarily restores operation, but the failure recurs. This repeatedly interrupts daily development and requires another backup and administrator-assisted recovery. Please investigate a durable fix in the supported desktop distribution.
Environment
Actual behavior
The following error occurs even for a simple ordinary command such as Get-Date. Paths have been redacted:
The original Windows message is Japanese: "アクセスが拒否されました。"
At failure, .sandbox/setup_marker.json was zero bytes and setup_error.json contained this error. This is not just an approval-picker display issue.
Expected behavior
After successful official provisioning, ordinary sandboxed work and the selected approval mode should remain usable across later startup/provisioning cycles, unless a documented policy change requires user action. If setup fails, the app should expose the reason and a supported recovery route clearly.
Observed sequence, not a deterministic clean-machine reproduction
Not every reboot fails. One reboot test passed before the subsequent recurrence. Windows Update or an application update has not been established as the trigger.
Timeline (JST)
Temporary recovery performed
From an administrator PowerShell process, using the verified app CLI:
On Nov 13, 95 relevant local files were backed up and their SHA256 copies matched before setup. Credentials and conversations were excluded. Setup removed setup_error.json and produced a valid version-5 marker (255 bytes).
config.toml and project Git metadata hashes stayed unchanged. The .sandbox-bin owner and DACL stayed unchanged; official setup changed the marker's owner/DACL.
This recovery did not manually edit ACLs, take ownership, disable the sandbox, enable full access, delete/regenerate .sandbox-bin, or replace official binaries. Earlier bin regeneration had not prevented later recurrence. An earlier, separate project-.git ACL error should not be conflated with this bin-lock failure.
Likely relationship to existing upstream fix — please confirm
Local ACL inspection on Nov 12 found a user-owned, protected, allow-only .sandbox-bin DACL. SYSTEM had mask 0x1301BF (Modify etc.), without WRITE_DAC; the provisioning service runs as LocalSystem.
An earlier pinned-source review of the installed CLI tag found the bin-opening path requesting READ_CONTROL | WRITE_DAC while the generated SYSTEM entry lacked WRITE_DAC. This is consistent with the contrast between service provisioning failure and user-elevated setup success. We did not trace the live service's access requests in a debugger.
This upstream commit's description and diff were rechecked on Nov 13:
b93a7b1
Related PR: #59745.
It addresses SYSTEM permissions and narrowly migrates the expected legacy ACL. Please confirm whether this is the same issue and how the fix reaches the installed desktop update channel. A fixed desktop binary has not been installed/tested on this PC.
Installed-tag source reviewed previously:
rust-v0.167.0-alpha.4.1, commit d2c0356
codex-rs/windows-sandbox-rs/src/setup_provisioning.rs, lines 345–389 and 870–909.
Requested investigation
Evidence boundaries
Current-session UI persistence and default read/write commands now pass. No additional reboot after the Nov 13 recovery or long-term stability test has been performed. No deterministic clean-VM reproduction, Windows 11/MXC result, or proof of a Windows Update trigger is claimed.
UI observations are user-reported; command exits, timestamps, hashes and ACL comparisons were inspected separately by the coding agent.
This is a sanitized summary: no personal usernames, machine names, account SIDs, credentials, private paths, project assets, session transcripts, raw logs or third-party source code are attached. Original local evidence can be reviewed for a narrowly requested, further-redacted excerpt if needed.
Official references
https://learn.chatgpt.com/docs/windows/windows-sandbox
https://learn.chatgpt.com/docs/reference/troubleshooting#feedback-and-logs