Windows Desktop: codex-windows-sandbox-setup.exe dialog appears on apply_patch after 26.616 update
Summary
After updating/reinstalling Codex Desktop on Windows, every apply_patch invocation triggers a Windows error dialog for codex-windows-sandbox-setup.exe, even when the patch itself reports success.
This appears to be related to the Windows sandbox helper used by Codex Desktop.
Environment
- OS: Windows 11 Pro, Windows 10.0.26200, x64, zh-CN locale
- Codex Desktop AppX package:
OpenAI.Codex_26.616.5445.0_x64__2p2nqsd0c76g0 - Codex CLI:
0.142.0-alpha.6 - Config:
[windows] sandbox = "elevated" - Workspace mode shown in session: workspace-write / restricted filesystem / restricted network
Symptoms
When apply_patch is used, Windows shows a modal error dialog for:
C:\Program Files\WindowsApps\OpenAI.Codex_26.616...\app\resources\codex-windows-sandbox-setup.exe
The dialog text is in Chinese:
找不到指定的模块。
Equivalent meaning: "The specified module could not be found."
In tool output, the related failure has also appeared as:
windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223
Important detail: apply_patch can sometimes return success and actually create the file, but the Windows dialog still appears. So the issue is not just patch failure; the sandbox helper launch itself is visibly broken/noisy.
Reproduction
Inside Codex Desktop on Windows:
- Open a local workspace.
- Run an
apply_patchthat adds a tiny temp file, for example:
*** Begin Patch
*** Add File: _codex_sandbox_write_test.tmp
+codex sandbox final write test
*** End Patch
- Observe that the patch may report success.
- A Windows error dialog appears for
codex-windows-sandbox-setup.exesaying the specified module cannot be found.
Expected behavior
apply_patch should not show a Windows modal error dialog. The sandbox helper should launch silently/successfully, or return a structured error to Codex without interrupting the user.
Actual behavior
A Windows modal error dialog appears every time this path is triggered, interrupting the workflow. This makes code editing in Codex Desktop impractical because apply_patch is the required safe edit path.
Things already tried
- Restarted Codex Desktop multiple times
- Updated Codex Desktop to the latest available build
- Ran AppX re-registration:
$pkg = Get-AppxPackage -Name OpenAI.Codex
Add-AppxPackage -DisableDevelopmentMode -Register (Join-Path $pkg.InstallLocation 'AppxManifest.xml')
- Uninstalled and reinstalled Codex Desktop
- Reset/rebuilt local sandbox cache:
- stopped old
codex-command-runner-0.142.0-alpha.6.exe - moved old
%USERPROFILE%\.codex\.sandbox-binaside - restarted Codex so it regenerated
.sandbox-bin - Ran
codex doctorin the real user environment: all checks green - Temporarily tested
[windows] sandbox = "unelevated", but that mode refused the current workspace policy because it cannot enforce split writable root sets directly; restoredelevated
Additional observations
codex doctorreports install/config/auth/search/git/state/websocket all OK.- The
.sandbox-binrunner is regenerated after restart and runs. - The issue seems specific to the Windows sandbox setup/helper path invoked by Desktop/apply_patch after the 26.616 update.
- Directly invoking the helper from the WindowsApps package path returned
Access is denied, though this may be expected for packaged app resources.
Impact
This blocks continued safe editing work in Codex Desktop on Windows because using apply_patch repeatedly triggers a modal OS error dialog.
21 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Update after retesting on a newer Codex Desktop build:
OpenAI.Codex_26.616.6631.0_x64__2p2nqsd0c76g0BROWSER_USE_CODEX_APP_VERSION:26.616.51431[windows] sandbox = "elevated".sandbox-bincontainscodex-command-runner-0.142.0-alpha.6.exeandcodex.exeResult: the issue still reproduces. A minimal
apply_patchadd-file operation reports success and creates the file, but Windows still shows thecodex-windows-sandbox-setup.exemodal error dialog. The temp file was then removed with PowerShell to avoid triggeringapply_patchagain.So the update to AppX
26.616.6631.0did not resolve the Windows sandbox helper dialog issue.Additional verification:
I tested whether the issue was caused by stale local sandbox marker state.
Before the test,
%USERPROFILE%\.codex\.sandbox\setup_marker.jsonstill contained:while the current sandbox log repeatedly reported:
I backed up the marker and changed
proxy_portsto an empty array, then stopped the currentcodex-command-runnerprocess so the next operation would start fresh.Result: a minimal
apply_patchadd-file operation still reported success but still produced the same Windows modal dialog:So the issue is not resolved by clearing stale
proxy_portsinsetup_marker.json; it still appears to be specific to theapply_patch/ filesystem-helper path launching the WindowsApps sandbox setup helper.Impact update / priority request:
This is a hard blocker for continuing real coding work in Codex Desktop on Windows.
The affected workflow is not optional for this project:
apply_patchis the required safe edit path used for code changes. Since everyapply_patchinvocation triggers a modal Windows error dialog fromcodex-windows-sandbox-setup.exe, continuing development causes repeated OS-level popups and makes the editing workflow impractical.Current practical impact:
apply_patchrepeatedly triggers the dialog.Request: please treat this as high priority / blocker for Windows Desktop users affected by this sandbox helper regression.
Follow-up after trying the workaround suggested in #29178:
I applied the workaround:
%USERPROFILE%\.codex\.sandbox\setup_marker.jsonso that:Result:
codex-windows-sandbox-setup.exedialog no longer appears.apply_patchcan add a new file successfully.apply_patchstill cannot update or delete existing files.Both update and delete operations fail with:
So the workaround avoids the modal dialog, but it does not restore usable code-editing functionality for this Desktop workspace because the session has split/multiple writable roots. This still blocks normal safe code editing: most real edits require updating existing files, not only adding new files.
Current state:
elevated: supports this workspace shape but triggers the WindowsApps sandbox setup modal dialog.unelevated: avoids the modal dialog, but cannot handle the current split writable root setup and fails on update/delete patch operations.This means there is currently no working Windows Desktop sandbox mode for safe
apply_patchediting in this environment.@codex Same here. Quite annoying. Please fix this bug.
I'm seeing the same issue. :/
same issue
please treat this as high priority / blocker for Windows Desktop users affected by this sandbox helper regression.
same
For the same problem, I found a possible solution:
I can still reproduce this on a newer Windows Desktop package:
OpenAI.Codex_26.616.9593.0_x64__2p2nqsd0c76g0codex-windows-sandbox-setup.exe找不到指定的模块。The specified module could not be found.The same class of failure appears when Codex tries to use the Windows filesystem sandbox/helper path. I have also seen the related structured error:
I checked Windows Security / Protection history and did not find any Codex/OpenAI/codex-windows-sandbox-setup.exe quarantine or block entry. The only recent item shown there was a OneDrive ransomware-protection recovery suggestion, so this does not look like a Defender quarantine case on my machine.
This started after the recent 26.616 update series and still reproduces on
26.616.9593.0, which is newer than several reports already listed here. That suggests the Windows sandbox setup/helper regression is not fully fixed in this build.This looks related to #29072 as well: the helper exists under the WindowsApps package path, but the failure seems to occur when Codex launches it from the packaged WindowsApps/AppContainer context.
Paid-user impact escalation:
The affected user is a ChatGPT Plus paid user and this issue is blocking the main value they use Codex Desktop for: safe code editing on a real Unity/C# project.
This is not a cosmetic popup only. In practice:
elevatedmode triggers the WindowsAppscodex-windows-sandbox-setup.exemodal dialog / helper launch failure.sandbox = "unelevated"+proxy_ports = []) avoids the modal dialog, butapply_patchupdate/delete operations fail with the split writable root error.elevateddoes not resolve it; the same modal/helper error returns.apply_patchis the required safe edit path.This makes Codex Desktop unusable for the user's paid monthly development workflow on Windows. Please prioritize either a fix or an official safe workaround for Windows Desktop users affected by this regression.
Still reproduces on
OpenAI.Codex_26.616.10790.0_x64__2p2nqsd0c76g0.Current reproduction result
Inside Codex Desktop on Windows, using
apply_patch:Add Filesucceeds.Update Filefails.Dialog text:
English meaning:
The specified module could not be found.Tool error after the dialog:
Local verification of the setup helper
I also checked the setup helper directly.
Resolved path:
Findings:
CN="OpenAI OpCo, LLC"Access is denied.EXIT_CODE=1.--helpalso returnsEXIT_CODE=1.This appears expected because static strings suggest the helper requires serialized payload from the Codex orchestrator, and bare/manual invocation goes through a
helper_request_args_failed-style error path.So the helper binary itself does not appear to be missing, unsigned, corrupted, or tampered with. The problem looks more like the Desktop orchestrator's launch/elevation path for the packaged WindowsApps helper.
Additional possibly related symptom
Codex may also create a literal
%SystemDrive%directory inside the workspace, for example:This suggests the Windows sandbox environment may be leaking or failing to expand system paths correctly. I am not claiming this is the direct cause of the setup-helper dialog, but it may be another symptom in the same Windows sandbox layer.
Impact
This still blocks normal safe editing on Windows Desktop because
apply_patchupdate operations fail, and the Windows modal dialog appears repeatedly.I get the same OS popup dialog and restricted
apply_patchbehavior in Codex CLI. I have cleared the user.sandboxand.sandbox-binrelated directories and launched Codex CLI from an elevated prompt, then ran/setup-default-sandboxbut the tool was unable to create the elevated sandbox and gave the following two options: quit the program, or use the unelevated sandbox.Same here, this is really an annoying bug.
same question ,but i try to modify sandbox from “elevated” to "unelevated".it can be useful
I can reproduce a very similar issue on Windows.
Environment
26.623.31443Get-AppxPackage OpenAI.Codex:26.623.3763.0C:\Program Files\WindowsApps\OpenAI.Codex_26.623.3763.0_x64__2p2nqsd0c76g0C:\Users\Lenovo\.codex\.sandbox-bin\codex-command-runner-0.142.2.exeC:\Program Files\Git\cmd\git.exegit version 2.54.0.windows.1Error
A Windows native dialog appears for:
C:\Program Files\WindowsApps\OpenAI.Codex_26.623.3763.0_x64__2p2nqsd0c76g0\app\resources\codex-windows-sandbox-setup.exeThe Chinese Windows dialog says:
找不到指定的模块。English equivalent:
The specified module could not be found.Trigger
The issue appears during Codex file-editing operations, especially:
apply_patchpatch_probe.txtWhat works normally
The following commands work normally and do not trigger the dialog:
A Playwright GUI test also worked:
headless: falsehttps://www.baidu.comSandbox modes tested
I tested both:
and:
The issue still reproduced in both modes. I reverted to
elevated.Already tried
C:\Program Files\Git.sandbox-binplugins\.plugin-appservercacheThe issue still occurs specifically during file-editing / apply_patch operations.
Additional note
The issue seems specific to the Windows native sandbox / fs-helper / apply_patch path rather than Git, Node, Playwright, or the project itself.
目前我的解决方案:.codex\.sandbox\setup_marker.json中的代理端口删除,同时使用proxifier进行codex对应的进程转发到代理端口(避免重连的问题),就正常了。
非常感谢,对我有所帮助!
t1ck-h @.***> 于2026年6月30日周二 10:54写道: