Windows Desktop elevated sandbox hangs after ACL setup and leaks setup helpers; unelevated works (0.145.0-alpha.18)

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

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

  1. Configure:

```toml
sandbox_mode = "workspace-write"

[windows]
sandbox = "elevated"
```

  1. Fully restart Codex Desktop.
  2. Start a local task in a normal workspace.
  3. 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.exe remains 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 completed was 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-access was 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:

  1. complete setup, run the requested command, and exit its setup helper; or
  2. 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.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 1 month ago

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

  • #32855

Powered by Codex Action

weijunswj · 1 month ago

Additional Windows observation showing the sandbox/Full Access differential:

  • Codex/ChatGPT desktop: 26.715.10079.0
  • Windows 11 Home 25H2, build 26200.8894, x64
  • In workspace-write sandbox mode, ordinary process/system queries such as Get-Process and tasklist repeatedly remained stuck and had to be terminated.
  • The same read-only diagnostics completed normally in Full Access/out-of-sandbox mode, generally within a few seconds.
  • Simple shell output still worked in sandbox mode, so the failure was concentrated around process/system inspection rather than every command.
  • Retrying sandboxed diagnostics was stopped to avoid accumulating leaked setup helpers.
  • At the time of the final process check, the count of codex-windows-sandbox-setup.exe was 0. 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.

JalenBuildsHub · 19 days ago

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

  • Codex App: 26.803.5235.0 (OpenAI.Codex, Microsoft Store package)
  • Codex CLI: 0.147.0
  • Windows: Windows 11 x64, build 10.0.26200
  • Native Windows workspace, not WSL
  • Elevated Windows sandbox through a named permissions profile
  • Hooks disabled during this reproduction

New 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.exe processes were present; 31 were children of the live bundled App
codex.exe process.

Two setup attempts from the same packaged App directory occurred within one second:

| Attempt | Helper payload length | Result |
| --- | ---: | --- |
| 21:42:02.206 | 7,988 bytes | Completed; log reached processed 1 write roots and setup binary completed |
| 21:42:02.578 | 10,720 bytes | Stalled after the ACL-read phase; never logged setup binary completed |

The payload emitted by the same long-lived App parent grew monotonically:

7,628 -> 9,964 -> 10,664 -> 10,832 bytes

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

  • The accumulating helpers use the sandbox binary bundled with the Store App.
  • Most leaking helpers are direct children of the App's bundled codex.exe / app-server.
  • A fresh App session starts with smaller payloads and works, then degrades as its per-session

payload grows.

  • Repo-rooted native CLI sessions using the same profile remain small and complete normally.
  • Narrowing a previously broad local write grant reduced the initial payload but did not prevent

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

  1. The App should rebuild or deduplicate the effective write-root set instead of accumulating roots

across a long-lived session.

  1. One tool request should not leave a CPU-spinning setup helper after the parent times out.
  2. Setup refresh should be single-flight per App parent, with orphan cleanup on timeout.
  3. If the root set is too large, Codex should fail promptly with the root count/payload size and an

actionable message rather than spawning another helper.

  1. App acceptance should include a long-session accumulation test, not only a per-attempt completion

ratio.

Suggested regression test

  • Keep one Codex App process open.
  • Exercise 50-100 tool calls across several exact repo workspaces.
  • Assert that the effective write-root count and serialized payload do not grow monotonically after

a workspace is released.

  • Assert that every setup helper exits within a bounded interval and that the live helper count

returns to zero.

  • Repeat with a named permissions profile containing :workspace_roots plus several explicit repo

grants.

Sanitized sandbox-log excerpts and a payload/root-count timeline can be supplied if helpful.