windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223
Empty the "proxy_ports" array in .codex\.sandbox\setup_marker.json, then stop it re-poisoning: add a [shell_environment_policy] exclude for proxy env vars in config.toml, or disable the experimental features.network_proxy flag. If that fails, set sandbox = "unelevated" under [windows], or roll the CLI back to 0.139.0. All community-reported — the fix users expected in 0.143.0 didn't fully land.
Affected versions: Windows app 26.616.x–26.623.x builds; CLI 0.140.0 and later with elevated sandbox (0.139.0 reported working)
On affected Windows setups, every apply_patch call fails with this error — the agent can read your code but can’t edit a single file. It surfaces as apply_patch verification failed: ... fs sandbox helper failed with status exit code: 1, first reported against Windows app build 26.616.3767.0 in #29072. Proxy users are hit hardest, for reasons covered below.
Symptoms
- Every patch attempt fails with this error; reads and shell commands may still work (#29072).
- A Windows dialog may appear:
codex-windows-sandbox-setup.exe - The specified module could not be found, pointing at the exe insideC:\Program Files\WindowsApps\OpenAI.Codex_...(#28982). - Reinstalling, repairing, and resetting workspace dependencies don’t clear it (#28982).
Cause
Win32 error 1223 is ERROR_CANCELLED — the launch was blocked or dismissed before it ran (Microsoft docs). OpenAI hasn’t posted a root cause, so what follows is community diagnosis from #29072. The experimental features.network_proxy feature writes proxy ports into .codex\.sandbox\setup_marker.json and breaks the elevated setup-helper launch — and with a proxy in .codex\.env, the ports get written back every time Codex runs an elevated shell command. Separately, the reporter showed the helper exe fails from the WindowsApps package path but runs fine when copied, byte-identical, to a normal directory.
Fix
Community-reported workarounds, in the order the thread converged on:
- Open
.codex\.sandbox\setup_marker.jsonand set"proxy_ports": []. Multiple users on #29072 confirm patching works again — until the ports get re-added. - Stop the re-poisoning in
config.toml:[shell_environment_policy]withexclude = ["ALL_PROXY", "all_proxy", "HTTP_PROXY", "http_proxy", "HTTPS_PROXY", "https_proxy"]. Trade-off per the same thread: shell commands likecurlstop seeing your proxy. - Or disable
features.network_proxyoutright and emptyproxy_portsone last time — one user reports that combination stuck (#29072). - Set
sandbox = "unelevated"under[windows]— confirmed by several users, with one report of a split-writable-root failure in workspace-write mode (#29072). - CLI users: roll back to 0.139.0 — one reporter found elevated-sandbox
apply_patchbroken in every release from 0.140.0 onward (#29072).
Affected versions
Per user reports on #29072 and #28982: Windows app builds 26.616.3309.0 through 26.623.5546.0, and CLI 0.140.0 onward with sandbox = "elevated". A fix was expected in 0.143.0, whose notes cover system-proxy routing and Windows sandbox credential fixes — but users report the error still reproduces on app builds shipped after it. Windows sandbox setup failures as a class go back further; see #10601 from February 2026. Both issues remain open with no maintainer reply as of July 15, 2026.
Facts on this page verified July 15, 2026.
- openai/codex #29072 — apply_patch fails, sandbox setup helper cannot launch (42 comments, open)
- openai/codex #28982 — codex-windows-sandbox-setup.exe: 'The specified module could not be found'
- openai/codex #10601 — earlier Windows sandbox setup failure class (Feb 2026)
- Codex 0.143.0 release notes — system proxy + Windows sandbox fixes
- Microsoft — Win32 system error codes (1223 = ERROR_CANCELLED)