Windows Desktop 26.721 repeats elevated sandbox setup; marker rewritten but unreadable/rejected
What version of the Codex App are you using (From “About Codex” dialog)?
OpenAI.Codex package version 26.721.4979.0
Bundled Codex CLI: 0.146.0-alpha.3.1
What subscription do you have?
PLUS
Which model were you using?
GPT-5.6 Sol, medium reasoning.
What platform is your computer?
Windows 11 Core, version 25H2, build 26200.8875, x64.
PowerShell 7.6.4 MSI at C:\Program Files\PowerShell\7\pwsh.exe.
The signed-in Windows user is a member of Administrators; ChatGPT Desktop normally runs at medium integrity under UAC.
What issue are you seeing?
ChatGPT/Codex Desktop repeatedly displays Finish Windows setup to continue and rejects every elevated shell launch, even though the Windows sandbox setup helper reports successful completion.
This looks closely related to #30445. This report confirms the behavior still occurs on Desktop 26.721.4979.0 / CLI 0.146.0-alpha.3.1, and adds a control test showing that the same Codex binary successfully runs the elevated sandbox from an external Administrator terminal.
On each Desktop command:
- Codex reports
sandbox setup marker missing or incompatible. - The setup helper successfully recreates or refreshes sandbox users, WFP rules, and ACLs.
- The helper reports
setup binary completed. - The marker file's modification time advances.
- The next Desktop command immediately rejects the resulting marker and repeats setup.
After the final reproduction, the marker was rewritten at 2026-07-26 07:18:30 +08:00, but the normal signed-in user could not read %USERPROFILE%\.codex\.sandbox\setup_marker.json:
Access to the path '%USERPROFILE%\.codex\.sandbox\setup_marker.json' is denied.
That strongly supports the marker ACL diagnosis in #30445. I have not manually changed the marker ACL so that the failing state remains available for diagnosis.
The user has experienced elevated-sandbox failures for several months across Codex versions.
Relevant configuration
The final reproduction used:
approval_policy = "on-request"
default_permissions = "trusted-development"
[features.network_proxy]
enabled = false
[permissions.trusted-development]
extends = ":workspace"
[permissions.trusted-development.network]
enabled = true
mode = "limited"
allow_local_binding = false
[windows]
sandbox = "elevated"
The experimental network proxy was explicitly disabled before the final reproduction.
What steps can reproduce the bug?
- Set
[windows] sandbox = "elevated"in the globalconfig.toml. - Keep
[features.network_proxy] enabled = false. - Fully quit and reopen ChatGPT Desktop.
- Create a new task using the
trusted-developmentpermission profile. - Ask it to run:
``powershell``
whoami
$PSVersionTable.PSVersion
(Get-Process -Id $PID).Path
- Observe Finish Windows setup to continue.
- Retry the command.
- Observe the same setup flow again, even though the helper log says setup completed.
What is the expected behavior?
The setup helper should run once, create a marker readable by the normal Desktop process, and then launch the command under an elevated sandbox identity such as:
<machine>\codexsandboxonline
What actually happens?
Desktop loops through setup. A fallback shell can sometimes run under the host identity:
<machine>\<user>
but the Desktop elevated sandbox does not start.
Key log evidence
Sanitized excerpt from %USERPROFILE%\.codex\.sandbox\sandbox.2026-07-25.log:
[2026-07-26 07:17:40.767 codex.exe] sandbox setup required: sandbox setup marker missing or incompatible
[2026-07-25T23:17:41.635015100+00:00] WFP setup succeeded for CodexSandboxOffline with 12 installed filters
[2026-07-26 07:17:41.893 codex-windows-sandbox-setup.exe] setup binary completed
[2026-07-26 07:17:46.598 codex.exe] sandbox setup required: sandbox setup marker missing or incompatible
[2026-07-25T23:17:47.321089200+00:00] WFP setup succeeded for CodexSandboxOffline with 12 installed filters
[2026-07-26 07:17:47.549 codex-windows-sandbox-setup.exe] setup binary completed
[2026-07-26 07:17:53.841 codex.exe] sandbox setup required: sandbox setup marker missing or incompatible
[2026-07-25T23:17:54.592460700+00:00] WFP setup succeeded for CodexSandboxOffline with 12 installed filters
[2026-07-26 07:17:54.838 codex-windows-sandbox-setup.exe] setup binary completed
External control test
A diagnostic launched from an external Administrator terminal used the same Codex binary and explicit configuration overrides.
===== unelevated sandbox probe =====
EXIT CODE: 0
<machine>\<user>
===== elevated sandbox probe =====
EXIT CODE: 0
<machine>\codexsandboxonline
The elevated control also logged:
setup refresh: processed 2 write roots (read roots delegated); errors=[]
setup binary completed
This shows that the sandbox users, WFP configuration, command runner, and elevated command execution can work when launched externally. The failure appears specific to Desktop reading/accepting the marker after its UAC-approved setup flow.
Troubleshooting already completed
- Repaired the Windows app.
- Recreated
.sandboxand.sandbox-bin. - Verified sandbox users exist and are enabled.
- Verified WFP/filter creation succeeds.
- Verified the setup helper and CLI binaries are intact.
- Verified chat/session SQLite databases are healthy and unrelated.
- Installed native PowerShell 7 MSI to eliminate a separate WindowsApps
pwsh.exealias launch denial. - Disabled the experimental network proxy.
- Confirmed Desktop shell execution works when
[windows] sandbox = "unelevated". - Confirmed the elevated sandbox works from an external Administrator terminal.
Workaround
The reliable workaround is:
[features.network_proxy]
enabled = false
[windows]
sandbox = "unelevated"
Related issues
- #30445 — same marker ACL / successful-helper-but-incomplete behavior
- #23712 — repeated Windows Desktop helper setup
- #10090 — elevated Windows sandbox command failures
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Another affected Windows user here. The app was working normally before, then suddenly started showing Finish Windows setup / Windows setup didn't finish.
Observed behavior:
Troubleshooting already tried with no effect:
%USERPROFILE%\.codex\config.toml.%USERPROFILE%\.codexdirectory aside so the app could recreate a clean state.The same failure persists even with a fresh
.codexdirectory, so this does not appear to be caused only by a corrupt config or stale sandbox state. The user reports that the desktop app was previously working normally and then failed suddenly, likely after an automatic app update.The only available older sandbox log is from a previously working session and shows
setup binary completed,errors=[], and successful PowerShell commands. The current failed setup flow does not appear to append a useful new error to that old log.Environment:
OpenAI.Codex_26.513.4821.0This looks consistent with the Desktop setup-marker/setup-state loop described in this issue, except that resetting the entire
.codexdirectory also did not recover the app.Additional reproduction on a newer 26.721 build — marker is readable and ACLs are correct
I am seeing a closely related repeated-UAC/setup loop with a newer package, but in this reproduction the marker is readable and its ACL is not the problem.
Environment
OpenAI.Codexpackage:26.721.11231.0codex-cli 0.146.0-alpha.3.1%LOCALAPPDATA%\ai-peer-review-harness\codex-runtime\<digest>.codex-windows-sandbox-setup.exefrom that staged runtime.Marker and account state
Both sandbox accounts exist and are enabled:
%USERPROFILE%\.codex\.sandbox\setup_marker.jsonis readable by the normal user, and the file ACL grants that userFullControl:So this reproduction is not explained by the marker-read ACL failure described in the original report.
Installed and staged binaries are identical
The controller-staged files are byte-identical to the current installed package files:
This rules out a stale staged runtime or mismatched setup helper in this case.
Repeated behavior
For the same staged runtime and the same canary worktree, ordinary Git commands repeatedly trigger the setup helper within seconds:
The helper is then invoked again for subsequent commands in the same workspace, producing repeated UAC prompts. The log also repeatedly contains:
That warning may be secondary, because the setup refresh is requested before it appears.
An additional notable detail is that the helper reports processing two write roots, while the marker read afterward still contains empty
read_rootsandwrite_rootsarrays.Operational impact
This prevents unattended nested reviewer/worker execution: approving the genuine OpenAI UAC prompt does not terminate the setup cycle, and multiple fresh agents can create a prompt storm. We are now failing the affected backend closed as
manual_action_requiredrather than retrying or falling back to unsandboxed execution.This appears to extend the issue in two ways:
26.721.11231.0with CLI0.146.0-alpha.3.1.I can provide a longer sanitized log excerpt or open a separate issue for the nested-CLI/controller invocation path if that would be more useful.
I reproduced this on Codex 26.810.7004.0 and found an ACL issue with setup_marker.json.
The sandbox helper successfully created %USERPROFILE%\.codex\.sandbox\setup_marker.json and both CodexSandboxOffline / CodexSandboxOnline local users, but the normal Codex process received Access denied when reading the marker. The marker contents were valid (version: 5, correct sandbox usernames, etc.).
Granting the interactive Windows user explicit Full Control on the existing marker with:
icacls "%USERPROFILE%\.codex\.sandbox\setup_marker.json" /grant "USERNAME:F"
immediately fixed the problem and Codex completed setup normally.
This suggests the helper is successfully creating the sandbox but applying an ACL to setup_marker.json that prevents the non-elevated Codex process from reading/validating it. Worth investigating the marker security descriptor/interactive-user SID handling.