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
- Open Codex Desktop integrated terminal (PowerShell 7).
- Run:
Get-Command rg -All
rg --version
- 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
What happened?
In Codex Desktop on Windows,
rgresolves to the bundled binary under the app package directory:C:\Program Files\WindowsApps\OpenAI.Codex_...\app\resources\rg.exeBut invoking
rgfrom the integrated PowerShell 7 terminal fails with Access Denied.Reproduction steps
Get-Command rg -Allrg --versionrgpoints to the bundled path and execution fails.Actual result
rg --versionfails 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
rgis exposed on PATH, it should be executable from the integrated terminal.Additional diagnostics
rg.exefile is readable and hashable.%TEMP%and running it works (ripgrep 15.1.0), suggesting the issue is path/package execution policy rather than binary corruption.Workaround
Putting Git's
rg.exeearlier in PATH works:C:\Program Files\Git\usr\bin\rg.exeAfter PATH update,
rg --versionsucceeds in the same terminal.Environment
PSEdition=Core)C:\Program Files\WindowsApps\OpenAI.Codex_26.304.1528.0_x64__2p2nqsd0c76g0\app\resources