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 #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: #24098
- Detailed reproduction comment on that issue: https://github.com/openai/codex/issues/24098#issuecomment-4998724127
A sanitized sandbox-log excerpt can be provided if needed.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗