Windows Desktop elevated sandbox hangs after ACL setup and leaks setup helpers; unelevated works (0.145.0-alpha.18)
Summary
This appears to be a regression or an incomplete fix related to openai/codex#24098, which was closed as completed after the Windows elevated sandbox fix was reported for 0.140.
On the current Codex Desktop build, the elevated Windows sandbox hangs before even a basic workspace read command starts. codex-windows-sandbox-setup.exe processes remain running and do not exit automatically. Switching only the Windows sandbox implementation to unelevated makes the same workspace read/write operations work normally without requiring danger-full-access.
Environment
- Codex Desktop:
26.715.2305.0 - Bundled CLI:
codex-cli 0.145.0-alpha.18 - Platform:
Microsoft Windows NT 10.0.26200.0 x64 - Top-level sandbox mode:
sandbox_mode = "workspace-write" - Approval policy: on request
- Native Windows workspace (not WSL)
Reproduction
- Configure:
```toml
sandbox_mode = "workspace-write"
[windows]
sandbox = "elevated"
```
- Fully restart Codex Desktop.
- Start a local task in a normal workspace.
- Run an ordinary read-only command, such as reading a small text file from the workspace.
Actual behavior
- The command does not reach PowerShell and remains stuck for more than 30 seconds.
- The command must be terminated.
codex-windows-sandbox-setup.exeremains running instead of exiting.- During the troubleshooting session, six lingering setup helper processes accumulated.
- Helper paths included both:
- the packaged
C:\Program Files\WindowsApps\OpenAI.Codex_<version>\app\resources\codex-windows-sandbox-setup.exe - a copied
%LOCALAPPDATA%\OpenAI\Codex\bin\<hash>\codex-windows-sandbox-setup.exe - The sandbox log reached the ACL phase:
- setup refresh spawned the helper;
- workspace write ACE application was logged;
- the read ACL run completed;
- but
setup binary completedwas never logged. - The intended workspace probe file was never created.
- The lingering setup helpers had to be terminated manually.
Unelevated comparison
After changing only:
[windows]
sandbox = "unelevated"
and fully restarting Codex Desktop:
- an ordinary sandboxed command completed in about 0.8 seconds;
- a workspace probe file was created, read back correctly, and deleted;
- the setup helper process count remained 0;
- the probe file left no residue;
danger-full-accesswas not needed.
This isolates the failure to the current elevated Windows sandbox path rather than the workspace or PowerShell itself.
Expected behavior
The elevated sandbox should either:
- complete setup, run the requested command, and exit its setup helper; or
- fail promptly with an actionable error.
It should not hang indefinitely or accumulate high-CPU setup helper processes.
Diagnostics and related report
- In-product Feedback ID:
019f6df6-f568-7122-8354-a33e5039658a - Earlier closed issue: openai/codex#24098
- Detailed reproduction comment on that issue: [https://github.com/openai/codex/issues/24098#issuecomment-4998724127](<https://github.com/openai/codex/issues/24098#issuecomment-4998724127>)
A sanitized sandbox-log excerpt can be provided if needed.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional Windows observation showing the sandbox/Full Access differential:
26.715.10079.026200.8894, x64workspace-writesandbox mode, ordinary process/system queries such asGet-Processandtasklistrepeatedly remained stuck and had to be terminated.codex-windows-sandbox-setup.exewas0. This occurrence therefore confirms the hang and Full Access workaround, but not a persistent helper leak in that particular sample.The practical workaround remains switching affected tasks to Full Access/no-sandbox and avoiding repeated sandbox retries. Full Access is only appropriate for trusted workspaces.
Additional reproduction: App-session write-root accumulation predicts leaked Windows sandbox helpers
I can reproduce the helper leak described here on a newer Codex App and CLI. The newer evidence
suggests that the elevated sandbox symptom is driven by the write-root payload growing inside a
long-lived App session, rather than by PowerShell or the workspace alone.
Environment
26.803.5235.0(OpenAI.Codex, Microsoft Store package)0.147.010.0.26200New reproduction evidence
The App process started after the local permissions profile had been narrowed, so this was not a
stale pre-fix App process. By 22:40 local time, 38
codex-windows-sandbox-setup.exeprocesses were present; 31 were children of the live bundled Appcodex.exeprocess.Two setup attempts from the same packaged App directory occurred within one second:
| Attempt | Helper payload length | Result |
| --- | ---: | --- |
|
21:42:02.206|7,988bytes | Completed; log reachedprocessed 1 write rootsandsetup binary completed||
21:42:02.578|10,720bytes | Stalled after the ACL-read phase; never loggedsetup binary completed|The payload emitted by the same long-lived App parent grew monotonically:
Stalls began when the payload crossed roughly 9.9 KB. In the day-long sample, payloads at or below
8,116 bytes normally completed, while payloads at or above 9,956 bytes stalled. This is an observed
boundary on one machine, not a proposed universal threshold.
The native CLI reading the same effective config emitted 2,512-2,708-byte payloads with 6-7 write
roots and completed sandbox refresh in roughly 30 ms. Multiple repo-rooted CLI tool runs completed
without leaking a helper.
At 23:04, before a separate blind-agent comparison, 16 setup helpers were already present. The count
remained 16 across three read-only child probes. At 23:14 all 16 were CPU-active during a two-second
sample; 12 were parented to the live App process, four had no live parent, and their combined working
set was about 291.5 MB. The child probes completed and left no processes, so they did not create or
worsen this backlog.
Why this looks App-specific
codex.exe/ app-server.payload grows.
the App-session payload from growing again.
The process working directory itself is not the differentiator: the same App directory produced
both the completed and stalled attempts above. Earlier home-rooted launches worsened the payload,
but they were a proxy for a larger write-root set, not the complete cause.
Expected behavior
across a long-lived session.
actionable message rather than spawning another helper.
ratio.
Suggested regression test
a workspace is released.
returns to zero.
:workspace_rootsplus several explicit repogrants.
Sanitized sandbox-log excerpts and a payload/root-count timeline can be supplied if helpful.