Skip to content

Windows standalone 0.146.0 launcher still cannot resolve sandbox setup and command-runner helpers #37049

Open

Description

@ricky-sensei

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

  1. Install Codex CLI using the Windows standalone installer.
  2. Launch codex through the normal PATH entrypoint at %LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe.
  3. Start a session using the Windows sandbox.
  4. Run a simple sandboxed PowerShell command, such as Get-Location.
  5. Observe orchestrator_helper_launch_failed with codex-windows-sandbox-setup.exe ... program not found.
  6. 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.exe
  • codex-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:

  1. launch successfully,
  2. create a temporary file,
  3. read it, and
  4. 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

Activity

  1. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    windows-osIssues related to Codex on Windows systems
    sandboxIssues related to permissions or sandboxing
    on Aug 5, 2026
  2. bespoke1117 commented on Aug 6, 2026

    @bespoke1117

    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

    • Windows 11
    • ChatGPT Desktop (MSIX)
    • Standalone Codex CLI originally on 0.145.0

    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:

    1. Is this junction expected to be considered unmanaged?
    2. Is there an officially supported migration path for older standalone installations using this junction layout?
    3. Could this installer state be related to the helper-resolution problems described in this issue family?

    Happy to provide additional diagnostics if useful.

  3. mdsahilnoob commented on Aug 8, 2026

    @mdsahilnoob

    I have raised an issue similar to this, looks like OpenAI haven't fixed it yet

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

    CLIIssues related to the Codex CLIbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions