Skip to content

Windows desktop: requested exec_command.shell differs from unified_exec_startup host #60573

Open

Description

@blshani2208-star

Component: Codex desktop on Windows, execution dispatch / shell selection.
Runtime package: OpenAI.CodexPrimaryRuntime.v26-1104-2876-0, package version 26.1104.2876.0, x64. Publisher metadata: OpenAI OpCo, LLC. Desktop app version and Windows build: not established by the retained evidence.

Summary
On 2026-11-10, one historical exec_command request explicitly selected a portable PowerShell executable through the shell field and login:false. The corresponding native execution event instead launched the Codex-managed PowerShell executable in the WindowsApps runtime package through unified_exec_startup. The wrapper rejected the host path before starting its benign child. No fresh reproduction or retry has been performed for this report.

Sanitized request shape (paths are placeholders, not a runnable reproduction)
cmd: & '\wrapper.ps1'
shell: \portable\pwsh.exe
workdir:
login: false
sandbox_permissions: omitted in the recovered request (no effective default is asserted)
yield_time_ms: 10000
max_output_tokens: 2000

Observed native startup shape
\dependencies\native\powershell\pwsh.exe -NoProfile -Command "& '\wrapper.ps1'"
Launcher label: unified_exec_startup.
Outcome: exit 1 at the wrapper's host-identity guard, with "HOLD: the running PowerShell executable is not the pinned host."
The intended fixed cmd.exe echo child did not start. The original attempt is closed; we are not asking for permission to bypass that guard or to retry it.

Evidence and limitations
The retained original request includes the shell field; omission by the executor is excluded for this event. The downstream host selection differs from that request. The exact internal selector, precedence rule, configuration source and accountable custodian are unknown.
Later static metadata reported both PowerShell files as version 7.6.9.500 with equal bytes/hash. That does not establish the resident image identity at the original invocation or make different paths equivalent to the wrapper's pinned host.
This report contains a redacted description only. It does not attach raw session logs, user or project paths, source code, credentials, organization data, chat identifiers or the complete session.

Questions for the maintainers

  1. Does the Windows desktop execution route support the per-call exec_command.shell selection shown above? If not, what is the documented supported behavior for this surface/version?
  2. Which component owns shell resolution before unified_exec_startup, and what source/control revision or documented precedence explains the requested-versus-launched difference?
  3. Is there a supported route that guarantees the requested executable is selected, without nesting another PowerShell process or weakening a host-identity guard?
  4. What supported evidence can correlate the request, resolved executable and actual image identity for the same invocation, including path/version/hash? Static file equality alone is insufficient for our acceptance condition.
  5. If this belongs to another OpenAI component or a private diagnostic channel, please identify the appropriate route. Additional diagnostics would require a separate review and approval; none are authorized by this issue.

No internal root cause, supported fix or runtime qualification is claimed. We request clarification of the supported contract and responsible component.

Activity

  1. added
    bug
    app
    windows-os
    tool-calls
    on Nov 10, 2026
  2. 330114067 commented on Nov 14, 2026

    @330114067

    Additional retained observation from Orca on Windows. No new reproduction was performed.

    Environment:

    • Orca 1.4.258.0 and Codex / Sandbox Helper 0.168.0 were reported earlier. Their correspondence to the executor serving this call has not been independently attested.
    • Windows build: not captured.
    • The actual process reported PowerShell 7.6.10.

    Retained exec_command request:
    {
    "cmd": "$PSVersionTable.PSVersion.ToString(); (Get-Process -Id $PID).Path",
    "shell": "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe",
    "login": false,
    "sandbox_permissions": "use_default",
    "max_output_tokens": 500
    }
    The private working directory is omitted.

    Observed process output:
    7.6.10
    C:\Program Files\PowerShell\7\pwsh.exe

    Process exit code: 0. This establishes execution through a different executable, not successful selection of Windows PowerShell 5.1.

    Separate observations:

    • An oversized precheck previously failed before process creation with Windows error 206. Retained inline literals alone totaled 36,069 characters; the exact failing expansion layer remains unknown.
    • Historical PowerShell 7 startup returned CreateProcessAsUserW error 740. A shared cause is not established.

    Relevant rust-v0.168.0 source functions:
    get_command; get_shell_by_model_provided_path; detect_shell_type; get_shell; get_powershell_shell.

    The published discovery code identifies a shell type from the supplied path and rediscovers its executable, preferring pwsh. Installed-binary correspondence remains unverified.

    Questions:

    1. Is there an officially supported per-call mechanism that preserves the exact absolute exec_command.shell path?
    2. Can an unavailable or disallowed explicit path fail closed instead of selecting another executable?
    3. Which non-executing diagnostic correlates the serving executor build, parsed request, resolver decision and final launch program?
    4. Is there a released fix or supported maintenance procedure preserving the existing session and sandbox policy?

    Related: #18937

    No raw logs, credentials, private repository details, business configuration or runtime object identifiers are included. No permissions, PATH, default shell or sandbox settings were changed.

  3. mdruy commented on Nov 25, 2026

    @mdruy

    I can confirm the shell-selection mismatch in a fresh, read-only test on November 25. Environment: Windows 11 26H2 26300.10075, desktop MSIX 26.1120.6357.0, Primary Runtime 26.1123.915.0. The command only returned (Get-Process -Id $PID).Path and $PSVersionTable.PSVersion.

    With login:false, both the default invocation and an invocation explicitly requesting C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe in exec_command.shell ran as the managed dependencies\native\powershell\pwsh.exe inside the Primary Runtime, version 7.6.9. When the command explicitly launched that same System32 executable as a child, the child reported Windows PowerShell 5.1.26100.10068.

    Please document when the desktop executor honors the requested shell. If the packaged host is required in this execution mode, return that as an explicit reason rather than silently selecting a different executable. This affects attempts to isolate a shell startup or package-dependency problem.

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

    appbugtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions