Windows sandbox times out waiting for runner spawn_ready on a local session (0.147.0), while danger-full-access works
What version of Codex CLI is running?
0.147.0
What subscription do you have?
ChatGPT Pro
Which model were you using?
gpt-5.4-codex (default)
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64 — Windows 11 Home
What terminal emulator and version are you using (if applicable)?
Local session. Reproduced from Git Bash and from PowerShell 7 directly on the machine — no SSH, no RDP, no remote session of any kind.
Steps to reproduce
Every command routed through the Windows sandbox times out before the runner reports ready. One trivial command is enough:
codex exec --skip-git-repo-check -s workspace-write -c approval_policy='"never"' "Run the shell command: pwd"
Actual result
ERROR codex_core::exec: exec error: windows sandbox: timed out after 15000ms waiting for runner spawn_ready
ERROR codex_core::tools::router: error=execution error: Io(Custom { kind: Other, error: "windows sandbox: timed out after 15000ms waiting for runner spawn_ready" })
exited -1 in 0ms
A single pwd prompt produced 9 of these in one run, as the agent retried. The same failure hits apply_patch, so no file edit can complete either — the model reports Failed to write file <path> and cannot tell that the cause was the sandbox rather than a rejected edit.
Expected result
The command runs, as it does with the sandbox disabled.
Control
Identical prompt, identical directory, same session, only the sandbox mode changed:
codex exec --skip-git-repo-check -s danger-full-access -c approval_policy='"never"' "Run the shell command: pwd"
succeeded in 2200ms
Zero occurrences of spawn_ready. So the failure is specific to the sandboxed runner path, not to the command, the directory, or the model.
The matching runner binary is present
This does not appear to be a missing-runner problem. ~/.codex/.sandbox-bin/ carries a runner whose version matches the CLI exactly, written at the same time as codex.exe:
298668336 Aug 14 04:26 codex.exe
1300272 Aug 14 04:27 codex-command-runner-0.147.0.exe
1301296 Aug 11 19:13 codex-command-runner-0.147.0-alpha.6.6.exe
1301296 Aug 8 12:08 codex-command-runner-0.147.0-alpha.6.5.exe
1302320 Aug 5 09:59 codex-command-runner-0.147.0-alpha.1.2.exe
1302320 Aug 2 02:41 codex-command-runner-0.146.0-alpha.9.2.exe
1302320 Jul 28 20:18 codex-command-runner-0.146.0-alpha.3.1.exe
1271600 Jul 13 14:32 codex-command-runner-0.144.2.exe
1271600 Jul 10 02:55 codex-command-runner-0.144.0-alpha.4.exe
1293104 Jul 5 18:15 codex-command-runner-0.142.5.exe
1211184 Jun 16 00:20 codex-command-runner-0.140.0-alpha.2.exe
No Windows Application Error dialog appears, and the runner produces no output of its own — it simply never reaches spawn_ready inside 15000 ms.
Relationship to existing issues
This is the same 15000 ms runner-startup family as several open reports, but at a different phase and under different conditions, so it did not look covered by any of them:
- #30839 —
timed out after 15000ms connecting runner pipe-in, but only over SSH; the reporter states local and RDP sessions work. This one is a purely local session. - #22834 —
timed out after 15000ms connecting runner pipe-inon 0.130.0, accompanied by a0xc0000022Application Error dialog. No dialog here, and no event-log entry. - #32060, #31768, #30024, #26803, #28339, #20570, #30219 — all fail at
CreateProcessAsUserWwith a specific Win32 error code. This one never reports aCreateProcessAsUserWfailure at all. - #36328, #37648 —
SetTokenInformation(TokenDefaultDacl) failed: 1344.
Searching the tracker for spawn_ready returns nothing, open or closed, so the wait-for-spawn_ready phase appears to be unreported.
Impact
With the sandbox on, the agent cannot run any command or edit any file, and each attempt costs 15 seconds before failing. Worse for tooling built on top: a PreToolUse hook that legitimately refuses an edit and a sandbox that failed to start are indistinguishable from the transcript — both surface as Failed to write file <path>. That makes an unenforced session look identical to a blocked one.
4 Comments
Seen this one on Windows before, the runner exe is right there but spawn_ready never fires, so it's not a missing binary. First thing I'd try: exclude
~/.codex/.sandbox-bin\from Defender/AV real-time scanning, that alone can eat the whole 15s window on first launch. If it still stalls, run withcodex exec --debugor RUST_LOG=codex_core=trace to see which phase hangs, and probe from a non-home workdir, the 1344 family in #36328 behaves like that. Oh, btw, in case it might help that, I built a portable Hermes OTG repo, check it, imo it may be able to help you diagnose and figure out the fix in no time. https://github.com/MilkyWay008/Hermes-OTGThe protocol placement of this timeout narrows the failure considerably (traced on
main@ 1f41cc5d92):What has already succeeded when this fires. The client creates the runner process and completes the pipe handshake before ever waiting for
spawn_ready(windows-sandbox-rs/src/elevated/runner_client.rs#L380-L420) — so the runner launched, connected both named pipes, and received the spawn request. And on the runner side,spawn_readyis only sent afterspawn_ipc_processreturns — i.e. after the sandboxed child has actually been created (restricted token, job object, ConPTY, redirected handles):https://github.com/openai/codex/blob/1f41cc5d92722748e45cae9cecc6d883a4e7cbb1/codex-rs/windows-sandbox-rs/src/bin/command_runner/win.rs#L580-L612
Crucially, a failing
spawn_ipc_processsends anErrorframe (ErrorStage::SpawnChild), which the client reports as "expected spawn_ready from runner, got …" — a different message than yours. A bare 15,000 ms timeout therefore means the runner sent nothing:spawn_ipc_processis hanging, not erroring. On a machine where this happens for every command, something is deterministically blocking restricted-token/ConPTY child creation — the classic profile being security software (AV/EDR) interposing onCreateProcessAsUser-style calls with restricted tokens, which also explains whydanger-full-access(no runner, plain spawn) works.Diagnostics that would pin it on your machine:
%USERPROFILE%\.codex\.sandbox\sandbox.YYYY-MM-DD.logplus the runner's per-spawn log dir — whatever the last logged stage is before silence identifies the hung step;[windows] sandbox = "elevated"vs"unelevated"in config bisects which spawn path is affected;codex-command-runner.exeto its exclusions) is the fastest confirmation of the interposition theory.Fix shapes for the repo:
spawn_ipc_processalready has stage granularity (ErrorStage), but only on the error path. Emitting a progress frame per stage — or converting a stage that exceeds its own sub-deadline into anErrorframe before the client's 15 s expires — turns "timed out waiting for spawn_ready" into "hung creating ConPTY / duplicating token / assigning job object", which is actionable.apply_patchsurfacing "Failed to write file" when the sandbox infrastructure failed invites the model to retry or misdiagnose. A distinct sandbox-infrastructure error class (non-retryable within the turn, surfaced to the user) would stop the retry burn for every failure of this kind.Additional reproducible variant on Codex Desktop for Windows: the cold tool call eventually succeeds, but consistently consumes ~28.5–29.5 seconds before the command itself starts; immediately subsequent calls are fast.
Environment
26.814.5167.0x64codex-command-runner-0.148.0-alpha.15.exe10.0.26200.8973Get-Date(no network)Measurements
After a full Codex Desktop restart:
| Run | End-to-end tool-call wall time | Inner command wait |
|---|---:|---:|
| Cold #1 | 28.624 s | 0.064 s |
| Warm #2 | 0.280 s | 0.058 s |
| Warm #3 | 0.282 s | 0.060 s |
The same cold pattern was reproduced multiple times in the same task after the tool/code-mode host had gone cold:
Earlier attempts also failed with the exact error:
Two consecutive failures returned after 15.119 s and 15.126 s.
Controls
to:
Then fully exited/restarted Codex Desktop and confirmed the new app/code-mode-host process start time. The cold call was still 28.624 s, so this variant is not eliminated by the elevated/unelevated switch.
Observed pattern
This is not necessarily only the first tool call ever in a conversation. It appears on the first call of a newly cold/recycled tool-host lifecycle; multiple operations issued continuously afterward are fast.
The stable ~28.6 s delay looks compatible with two ~15 s runner/pipe readiness windows or a timeout followed by a successful fallback/retry. Expected behavior is for the first harmless local tool call to complete in roughly the same sub-second range as warm calls, or to fail fast with a phase-specific diagnostic.
If 0.147.0 Windows sandbox times out on
spawn_readywhiledanger-full-accessworks, treat it as a runner-start stall, not a bad command.Method:
workspace-writecommand.%USERPROFILE%\.codex\.sandbox-binfrom Defender / AV real-time scanning, then retry.%USERPROFILE%\.codex\.sandbox\sandbox.YYYY-MM-DD.logto see whether setup finished and which phase hung.danger-full-accessonly as a temporary bypass, not as the fix.Evidence: the timeout fires after the client has already created the runner. 0.146.x users report a complete setup + pwd success; 0.147.0 local sessions hang before spawn_ready.
Independent community workaround; not an official OpenAI fix.