Skip to content

Windows Codex Desktop: exec_command fails to resolve bundled pwsh.exe (0x80008085) despite valid file; explicit canonical D: shell still reports C: alias #55121

Open

Description

@alexeyagafonov-ux

Summary

On October 18, 2026, Codex Desktop on Windows x64 failed before running any requested command with:

Failed to resolve full path of the current executable [%USERPROFILE%\.cache\codex-runtimes\codex-primary-runtime\dependencies\native\powershell\pwsh.exe]

Tool exit code: -2147450747 / 0x80008085.

The logical runtime path %USERPROFILE%\.cache\codex-runtimes is redirected to another volume, D:\<redacted>\Codex-Runtimes. Both the bundled pwsh.exe file and its containing directory exist. Read-only stat and realpath from the Codex-provided Node REPL resolve the alias to the D: target. Outside Codex, the same bundled PowerShell is Authenticode-signed by Microsoft and successfully runs $PSVersionTable.PSVersion.ToString() (7.6.5, exit code 0).

Reproduction and evidence

  1. In a local Codex Desktop workspace on D:, with its ordinary on-request approval and workspace-scoped sandbox, request Get-Location using the standard PowerShell shell. It fails before emitting command output.
  2. Request one diagnostic tool invocation with the shell parameter explicitly set to the canonical D: path of codex-primary-runtime\dependencies\native\powershell\pwsh.exe, the existing workspace as cwd, login=false, and command $PSVersionTable.PSVersion.ToString().
  3. The recorded tool request includes the canonical D: executable, but its response again gives exit -2147450747 and the error naming the logical C: executable. The command's execution and actual process image are unverified.

A session JSONL record confirms the canonical-path request on October 18 at approximately 21:16:26 UTC+03, with failure in the next second. The tool exposes combined output, not separate stdout/stderr.

Sandbox and permissions context

  • A sandbox log from October 18 records MXC availability: true and Windows sandbox selection: mxc. Correlation of that selection to the exact canonical-path call has not independently been established.
  • Application configuration contains the enabled prefer_mxc feature.
  • The submitted permission description for the test included :root = read, workspace-scoped writes, on-request/auto-reviewed approvals and disabled network access. No conflicting explicit deny rule was found in the inspected description. This is not proof of effective native MXC access.
  • The selected UI approval mode remained stable; no transition to Custom was observed.
  • No changes to ACLs, sandbox backend, junctions, cache, or system settings were made.

Expected

The requested, existing, executable pwsh.exe should be resolved and launched within the effective sandbox policy, or the launcher should report the actual failing Windows operation and path, with a specific actionable diagnostic.

Questions for maintainers

Could you trace:

  • Requested shell argument vs internally selected bundled executable;
  • Normalization/resolution of a redirected %USERPROFILE% runtime path to a D: target;
  • Effective MXC policy materialization for both paths;
  • The Windows API call that fails before process startup and its native status?

The underlying failing operation and root cause remain unverified. This report should not be interpreted as evidence that junctions or MXC permissions necessarily cause the failure.

Related

No confidential files or raw logs are attached; personal paths are redacted.

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    tool-calls
    on Oct 18, 2026
  2. Suonlim commented on Nov 10, 2026

    @Suonlim

    Additional Windows reproduction (2026-11-08, Singapore time). This appears to share the failure signature, but I have not verified the same underlying cause or any redirected runtime path.

    Environment / evidence

    • Windows 11, Codex Desktop, local workspace under C: (exact directory redacted).
    • Sandbox log, around 21:04–21:11: MXC availability: true and Windows sandbox selection: mxc. This establishes backend selection in that period, not the failing native operation.
    • Bundled executable: %USERPROFILE%\.cache\codex-runtimes\codex-primary-runtime\dependencies\native\powershell\pwsh.exe.
    • File exists; size 301,360 bytes.
    • Launching that exact bundled executable in ordinary Windows PowerShell works and reports PowerShell 7.6.9.
    • Starting a Codex shell fails before the requested command runs, with Failed to resolve full path of the current executable [...\pwsh.exe]; tool exit code -2147450747 (0x80008085).
    • Asking Codex to use the explicit Windows PowerShell 5.1 executable path still produces an error naming the bundled pwsh.exe. The requested command never executes.
    • Restarting Codex Desktop and trying one more read-only version check did not resolve it.
    • Windows Application Event Log contains .NET Runtime event ID 1023, with the same executable path and error, at 20:56:27, 20:59:12, 21:04:37, and 21:11:10 (2026-11-08, Asia/Singapore).
    • The dated Codex sandbox log contains MXC selection entries but no matching access denied or Failed to resolve full path text in the inspected entries.

    Interpretation: Independent host execution succeeds, so the binary is not universally unlaunchable. The failure may relate to Codex's process-launch context, effective MXC file visibility/access, path normalization, or .NET host startup. No first failing native API or OS access-denied status has been captured. In contrast to the original report here, no path redirection/junction has been established on this machine. This is not evidence of a PowerShell 7.6.9-specific regression.

    Request: Could maintainers investigate (1) the requested shell versus actual bundled executable choice, (2) the effective MXC access/path mapping for the executable and ancestors, and (3) the first failing native API and .NET host dependency lookup? Is there a supported diagnostic that captures these details without disabling the sandbox, changing ACLs, or deleting the runtime cache?

    No cache changes, sandbox weakening, or elevated Codex execution were attempted. Desktop package, bundled CLI version and full Windows build are not yet established; they can be added separately if required.

  3. Linda415 commented on Nov 19, 2026

    @Linda415

    I reproduced the same error in a Codex task launched through ChatGPT Dot on a connected Windows PC on November 19, 2026. The task fails before running any command, including the read-only check $PSVersionTable.PSVersion.ToString().

    Failed to resolve full path of the current executable [...\native\powershell\pwsh.exe]
    

    Exit code: -2147450747 (0x80008085).

    • Launching the exact same bundled pwsh.exe manually from Windows PowerShell with -NoProfile succeeds and reports 7.6.9.
    • In the Codex task, login=false and the default sandbox permissions give the same failure from both the Windows user directory and a project directory on D:.
    • Fully exiting and reopening the desktop app did not fix it. The latest retry in the original task was around 13:13 UTC. Sandbox permissions were not changed.

    I haven’t verified the active Windows sandbox implementation or whether this shares the original report’s underlying cause. What diagnostics would help determine why the same executable starts manually but not in the remote task?

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

    appbugsandboxtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions