Repository navigation
Windows standalone 0.146.0 launcher still cannot resolve sandbox setup and command-runner helpers #37049
Description
What version of Codex CLI is running?
codex-cli 0.146.0
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64 (windows-x86_64, ja-JP)
Installation/runtime
Standalone package installed under:
%USERPROFILE%\.codex\packages\standalone\releases\0.146.0-x86_64-pc-windows-msvc
Normal launcher entrypoint:
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe
codex doctor --summary --ascii reported the runtime and installation as consistent. The package's codex-resources directory contained both helper executables.
What issue are you seeing?
Sandboxed PowerShell commands failed before the command process started. The sandbox log showed that the normal launcher tried to spawn the setup helper by bare name even though the matching helper existed in the active standalone package:
setup refresh: spawning codex-windows-sandbox-setup.exe
setup refresh failed to launch helper: helper=codex-windows-sandbox-setup.exe, cwd=%USERPROFILE%, error=program not found
The process PATH included the active package's codex-path directory, but that directory initially contained only rg.exe. The matching setup helper existed under codex-resources, and its SHA-256 matched a manually copied file.
After temporarily making codex-windows-sandbox-setup.exe discoverable through the active package's codex-path, setup refresh completed, but execution then failed at the next helper-resolution step:
helper copy failed for command-runner: helper not found next to current executable or under codex-resources:
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe
falling back to legacy path codex-command-runner.exe
CreateProcessWithLogonW failed: 2
This is the same two-stage failure described in #28457, now reproduced on 0.146.0.
Steps to reproduce
- Install Codex CLI using the Windows standalone installer.
- Launch
codexthrough the normal PATH entrypoint at%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe. - Start a session using the Windows sandbox.
- Run a simple sandboxed PowerShell command, such as
Get-Location. - Observe
orchestrator_helper_launch_failedwithcodex-windows-sandbox-setup.exe ... program not found. - If the setup helper is made discoverable through PATH, retry and observe the command-runner lookup failure followed by
CreateProcessWithLogonW failed: 2.
Expected behavior
The normal standalone launcher should resolve both helpers from the active versioned package's codex-resources directory:
codex-windows-sandbox-setup.execodex-command-runner.exe
It should not fall back to launching either helper by bare filename when matching helpers exist in the active package.
Verified workaround
Copying the matching 0.146.0 helpers from the active package's codex-resources directory to:
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex-resources\
and making the setup helper discoverable through the active package's codex-path allowed a normal, non-elevated sandbox tool call to:
- launch successfully,
- create a temporary file,
- read it, and
- delete it.
The copied helper hashes matched the files shipped with the same 0.146.0 package.
This workaround is version-sensitive and may be overwritten or become stale after an update, so the launcher should resolve helpers from the active package rather than requiring copied binaries.
Related issues
- Codex CLI 0.140.0 standalone Windows launcher cannot resolve sandbox helpers; sandbox fails with helper=codex-windows-sandbox-setup.exe program not found #28457 — same setup-helper failure followed by command-runner/
CreateProcessWithLogonW failed: 2 - codex-windows-sandbox-setup.exe not found by CLI setup after clean install due to bin junction #30829 — clean standalone install and
binlauncher/junction resource resolution - Windows CLI 0.144.1: exec-tool setup refresh spawns codex-windows-sandbox-setup.exe by bare name (program not found), while code-mode host path resolves the versioned full path in the same session #32359 — setup refresh launches the helper by bare name
- windows sandbox: spawn setup refresh, fails several times on a new session or after /clear, and then it works #21208 — repeated sandbox setup-refresh failures on fresh sessions
Activity
bespoke1117 commentedon Aug 6, 2026
Additional reproduction from a separate Windows installation.
I believe I am seeing the same underlying launcher/helper-resolution issue, but I also found what appears to be a related installer behavior.
Environment
The PATH launcher is:
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe
which is a junction to:
%USERPROFILE%.codex\packages\standalone\current\bin
Current standalone package layout:
%USERPROFILE%.codex\packages\standalone
current
releases
0.144.1-x86_64-pc-windows-msvc
0.145.0-x86_64-pc-windows-msvc
I then attempted to update using the currently documented Windows installer command:
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
The installer detected the update:
Updating Codex CLI from 0.145.0 to 0.146.1
Detected platform: Windows (x64)
Resolved version: 0.146.1
Downloading Codex CLI
but then stopped with:
Refusing to retarget junction at
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin
because it is not managed by this installer.
The CLI therefore remained on 0.145.0.
Questions:
Happy to provide additional diagnostics if useful.
mdsahilnoob commentedon Aug 8, 2026
I have raised an issue similar to this, looks like OpenAI haven't fixed it yet