Windows Desktop 26.721 repeats elevated sandbox setup; marker rewritten but unreadable/rejected

Open 💬 4 comments Opened Jul 25, 2026 by Penthus
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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:

  1. Codex reports sandbox setup marker missing or incompatible.
  2. The setup helper successfully recreates or refreshes sandbox users, WFP rules, and ACLs.
  3. The helper reports setup binary completed.
  4. The marker file's modification time advances.
  5. 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?

  1. Set [windows] sandbox = "elevated" in the global config.toml.
  2. Keep [features.network_proxy] enabled = false.
  3. Fully quit and reopen ChatGPT Desktop.
  4. Create a new task using the trusted-development permission profile.
  5. Ask it to run:

``powershell
whoami
$PSVersionTable.PSVersion
(Get-Process -Id $PID).Path
``

  1. Observe Finish Windows setup to continue.
  2. Retry the command.
  3. 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 .sandbox and .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.exe alias 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

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #35349

Powered by Codex Action

personalsovereignty888-hash · 1 month ago

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:

  1. Launch ChatGPT/Codex Desktop.
  2. Click Try Windows setup again.
  3. Approve the genuine OpenAI LLC UAC prompt.
  4. The app immediately returns to Windows setup didn't finish.

Troubleshooting already tried with no effect:

  • Renamed/reset %USERPROFILE%\.codex\config.toml.
  • Fully quit the app and retried as administrator.
  • Moved the entire %USERPROFILE%\.codex directory aside so the app could recreate a clean state.
  • Repeated the UAC-approved Windows setup flow.

The same failure persists even with a fresh .codex directory, 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:

  • ChatGPT Plus
  • Windows x64
  • Chinese UI locale
  • Previously working package shown in old logs: OpenAI.Codex_26.513.4821.0
  • Current package version not yet confirmed

This looks consistent with the Desktop setup-marker/setup-state loop described in this issue, except that resetting the entire .codex directory also did not recover the app.

richiejacob · 28 days ago

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.Codex package: 26.721.11231.0
  • Bundled/staged CLI: codex-cli 0.146.0-alpha.3.1
  • Windows x64
  • Invocation context: fresh nested Codex reviewer/worker processes launched by a local automation controller. The controller stages the signed binaries from the installed Windows package under %LOCALAPPDATA%\ai-peer-review-harness\codex-runtime\<digest>.
  • The UAC dialog identifies the genuine signed codex-windows-sandbox-setup.exe from that staged runtime.
Marker and account state

Both sandbox accounts exist and are enabled:

CodexSandboxOffline  Enabled=True
CodexSandboxOnline   Enabled=True

%USERPROFILE%\.codex\.sandbox\setup_marker.json is readable by the normal user, and the file ACL grants that user FullControl:

{
  "version": 5,
  "offline_username": "CodexSandboxOffline",
  "online_username": "CodexSandboxOnline",
  "proxy_ports": [],
  "allow_local_binding": false,
  "read_roots": [],
  "write_roots": []
}
NT AUTHORITY\SYSTEM     FullControl
BUILTIN\Administrators FullControl
<normal user>           FullControl

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:

codex.exe SHA-256
39E9E041EA33AC34AAD9578ADFE660C5C7A6DC8F82620B77623960F9352A6EF3

codex-windows-sandbox-setup.exe SHA-256
400CF60D47A8F865E33E43815ECADF3369FE71C4AB830C712AA9E949D6B06AE1

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:

setup refresh: spawning ...\codex-windows-sandbox-setup.exe
setup refresh: processed 2 write roots (read roots delegated); errors=[]
setup binary completed

sandbox setup required: sandbox users missing or incompatible with marker version

setup refresh: spawning ...\codex-windows-sandbox-setup.exe
setup refresh: processed 2 write roots (read roots delegated); errors=[]
setup binary completed

The helper is then invoked again for subsequent commands in the same workspace, producing repeated UAC prompts. The log also repeatedly contains:

hide users: failed to hide current user profile dir (C:\Users\Default):
SetFileAttributesW failed for C:\Users\Default: 5 (Access is denied.)

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_roots and write_roots arrays.

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_required rather than retrying or falling back to unsandboxed execution.

This appears to extend the issue in two ways:

  1. It still occurs on package 26.721.11231.0 with CLI 0.146.0-alpha.3.1.
  2. It can occur even when the marker is readable, the ACL is correct, both users exist, and the staged/installed binaries match exactly.

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.

topgravy · 12 days ago

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.