Skip to content

Windows: bundled rg in Codex Desktop resolves on PATH but fails with Access Denied in integrated PowerShell #13542

@neavo

Description

@neavo

What happened?

In Codex Desktop on Windows, rg resolves to the bundled binary under the app package directory:

C:\Program Files\WindowsApps\OpenAI.Codex_...\app\resources\rg.exe

But invoking rg from the integrated PowerShell 7 terminal fails with Access Denied.

Reproduction steps

  1. Open Codex Desktop integrated terminal (PowerShell 7).
  2. Run:
    • Get-Command rg -All
    • rg --version
  3. Observe that rg points to the bundled path and execution fails.

Actual result

rg --version fails with an error similar to:

Program 'rg.exe' failed to run ... Access is denied.

Also, another executable in the same folder (codex-command-runner.exe) fails with the same access-denied error when launched from terminal context.

Expected result

If bundled rg is exposed on PATH, it should be executable from the integrated terminal.

Additional diagnostics

  • The bundled rg.exe file is readable and hashable.
  • Copying the same binary to %TEMP% and running it works (ripgrep 15.1.0), suggesting the issue is path/package execution policy rather than binary corruption.
  • ACL/SDDL for files under the package path appears to include app-identity-conditioned entries (WindowsApps package restrictions).

Workaround

Putting Git's rg.exe earlier in PATH works:

C:\Program Files\Git\usr\bin\rg.exe

After PATH update, rg --version succeeds in the same terminal.

Environment

  • OS: Windows (user environment)
  • Terminal: PowerShell 7.5.4 (PSEdition=Core)
  • Codex Desktop package path observed:
    C:\Program Files\WindowsApps\OpenAI.Codex_26.304.1528.0_x64__2p2nqsd0c76g0\app\resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingterminalIssues related to the in-app terminalwindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions