Skip to content

Windows sandbox helper launch fails after update: ShellExecuteExW 1223 #29115

Open

Description

@shawdon2024-coder

What version of Codex CLI is running?

0.142.0-alpha.1 Codex Desktop WindowsApps package observed by doctor: OpenAI.Codex_26.616.4196.0 The issue originally started after update to: OpenAI.Codex_26.616.3767.0

What subscription do you have?

PLUS

Which model were you using?

gpt-5.4 high

What platform is your computer?

Windows 11 Professional, 10.0.26100, x64, zh-CN

What terminal emulator and version are you using (if applicable)?

Windows PowerShell 5.1 / classic PowerShell console window launched by Codex Desktop

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1781885143s since unix epoch",
  "overallStatus": "fail",
  "codexVersion": "0.142.0-alpha.1",
  "notes": "Full codex doctor --json was run locally. The main failing check was terminal.env: TERM=dumb. Installation check was OK. Current WindowsApps package observed by doctor: OpenAI.Codex_26.616.4196.0. The sandbox helper issue originally started after update to OpenAI.Codex_26.616.3767.0 and is still being investigated after the later package update.",
  "keyChecks": {
    "installation": "ok - installation looks consistent",
    "auth.credentials": "ok - auth is configured",
    "network.provider_reachability": "ok",
    "network.websocket_reachability": "ok",
    "sandbox.helpers": "ok - sandbox configuration is readable; filesystem sandbox shown as unrestricted, network sandbox enabled",
    "terminal.env": "fail - TERM=dumb; expected TERM=xterm-256color or another real terminal type",
    "system.environment": "Windows 10.0.26100 / Windows 11 Professional / zh-CN",
    "runtime.provenance": "Codex CLI 0.142.0-alpha.1, windows-x86_64"
  }
}

What issue are you seeing?

Feedback thread ID: 019ee09a-d5dc-7850-bb14-0346df654d3a

After updating Codex Desktop on Windows to 26.616.3767.0, sandbox/helper launch became unstable. apply_patch can sometimes create a file, but deleting/editing later fails with:

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

Windows popup also shows codex-windows-sandbox-setup.exe with:
"The specified module could not be found."

The issue started immediately after the 2026-06-19 update.

What steps can reproduce the bug?

Uploaded thread: 019ee09a-d5dc-7850-bb14-0346df654d3a

What is the expected behavior?

Codex should consistently launch the Windows sandbox helper and complete file edit operations, including create, modify, and delete, without intermittent ShellExecuteExW 1223 failures.

If the helper cannot launch, the error should include the exact failing executable path and a remediation step.

Additional information

Related to #24259, but my environment is Windows 11 x64, not ARM64.

Issue started immediately after Codex Desktop updated on 2026-06-19.

Current observed versions:

  • Codex CLI: 0.142.0-alpha.1
  • Codex Desktop WindowsApps package: OpenAI.Codex_26.616.4196.0
  • Original failing package after update: OpenAI.Codex_26.616.3767.0
  • OS: Windows 11 Professional 10.0.26100 x64 zh-CN

Observed behavior:

  • apply_patch can create .sandbox_probe.tmp
  • deleting the same file later fails with:
    windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223
  • Windows popup says:
    codex-windows-sandbox-setup.exe
    The specified module could not be found.

Uninstalling/reinstalling Codex did not fix it.
Feedback thread ID:
019ee09a-d5dc-7850-bb14-0346df654d3a

Image Image

sandbox.2026-06-19.log

Activity

  1. added
    bug
    on Jun 19, 2026
  2. added
    app
    windows-os
    sandbox
    on Jun 19, 2026
  3. CZH0919 commented on Jun 19, 2026

    @CZH0919

    the same

    Image
  4. shawdon2024-coder commented on Jun 19, 2026

    @shawdon2024-coder
    Author

    Update: changing Codex config from:

    [windows]
    sandbox = "elevated"

    to:

    [windows]
    sandbox = "unelevated"

    appears to work around the issue on my machine. After restarting Codex, file edit operations that previously failed with ShellExecuteExW 1223 are working again.

  5. eliotcougar commented on Jun 19, 2026

    @eliotcougar

    See if you have "proxy_ports": [] array set to anything other than empty in .codex\.sandbox\setup_marker.json.
    In my case, setting it to empty fixed very similar apply_patch failures that started happening after update to 26.616

    One caveat: I have a proxy set in .codex\.env and every time Codex runs any elevated shell command, the port gets added back to setup_marker.json and apply_patch stops working again.

    The solution was found by Codex after about 30 minutes of investigating its own failures on extra-high.

  6. shawdon2024-coder commented on Jun 19, 2026

    @shawdon2024-coder
    Author

    See if you have "proxy_ports": [] array set to anything other than empty in .codex\.sandbox\setup_marker.json. In my case, setting it to empty fixed very similar apply_patch failures that started happening after update to 26.616

    One caveat: I have a proxy set in .codex\.env and every time Codex runs any elevated shell command, the port gets added back to setup_marker.json and apply_patch stops working again.

    The solution was found by Codex after about 30 minutes of investigating its own failures on extra-high.

    I solved it using the method I just replied with.

  7. JSbiu commented on Jun 22, 2026

    @JSbiu

    See if you have "proxy_ports": [] array set to anything other than empty in .codex\.sandbox\setup_marker.json. In my case, setting it to empty fixed very similar apply_patch failures that started happening after update to 26.616

    One caveat: I have a proxy set in .codex\.env and every time Codex runs any elevated shell command, the port gets added back to setup_marker.json and apply_patch stops working again.

    The solution was found by Codex after about 30 minutes of investigating its own failures on extra-high.

    Thanks, this fixed the issue for me. Clearing proxy_ports and moving the proxy out of .codex/.env to Clash TUN stopped the COM+ popup and ShellExecuteExW 1223 errors. apply_patch now works consistently. Really appreciate you sharing this!🌹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions