Windows desktop shell exposes bundled rg.exe, but executing it fails with Access is denied
What version of the Codex App are you using (From “About Codex” dialog)?
Observed packaged app version from the resolved bundled executable path:OpenAI.Codex_26.415.1938.0_x64__2p2nqsd0c76g0
I could not get a separate value from the Windows package query, but this is the exact bundle path that Get-Command rg resolves to inside the Codex desktop shell.
What subscription do you have?
The local Codex auth configuration is currently in API key mode (auth_mode=apikey). I am not using a separate Codex subscription plan from within the app UI for this repro.
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What issue are you seeing?
Inside the Codex desktop shell on Windows, rg appears to be available, but it is not actually executable.
Get-Command rg succeeds and resolves to the bundled executable:C:\Program Files\WindowsApps\OpenAI.Codex_26.415.1938.0_x64__2p2nqsd0c76g0\app\resources\rg.exe
But any attempt to execute it fails immediately with an access error:
Program 'rg.exe' failed to run: An error occurred trying to start process 'C:\Program Files\WindowsApps\OpenAI.Codex_26.415.1938.0_x64__2p2nqsd0c76g0\app\resources\rg.exe' with working directory 'C:\code\doc'. Access is denied.
I reproduced the same failure for:
rg --versionrg --filesrg -n -- "--serve" C:\code\doc\script\codex_token_report\codex_token_report.py- directly invoking the absolute executable path shown by
Get-Command rg
I also reproduced the same failure when running the same command from an escalated shell launched through Codex tooling, so this does not look like a simple non-elevated PATH problem.
This is especially confusing because the normal agent guidance recommends using rg, and the shell environment makes it look installed and available.
What steps can reproduce the bug?
- Install and launch the Codex desktop app on Windows.
- Open a shell inside the Codex desktop environment.
- Run:
``powershell``
Get-Command rg | Format-List Name,CommandType,Source,Path,Version
- Observe that PowerShell resolves
rgto:
C:\Program Files\WindowsApps\OpenAI.Codex_26.415.1938.0_x64__2p2nqsd0c76g0\app\resources\rg.exe
- Run:
``powershell``
rg --version
- Observe the command fails immediately with
Access is denied. - Run the resolved absolute path directly:
``powershell``
& 'C:\Program Files\WindowsApps\OpenAI.Codex_26.415.1938.0_x64__2p2nqsd0c76g0\app\resources\rg.exe' --version
- Observe the same
Access is deniedfailure. - Repeat from an escalated shell.
- Observe the same result.
What is the expected behavior?
If Codex exposes rg on PATH inside its desktop shell, the bundled rg.exe should be executable.
At minimum, one of these should be true:
rgruns successfully from the Codex shell on Windows- Codex does not put an unusable
rgon PATH - Codex detects this packaging/permission problem and falls back to another supported search tool
Additional information
- PowerShell version:
7.6.0 - The executable is visible enough for
Get-Commandandwhere-style resolution, but not actually launchable. - Local workaround on this machine is to avoid
rgentirely and use PowerShell-native search (Get-ChildItem,Select-String,Get-Content), but that breaks the expected workflow and tool recommendations. - This may be related to the bundled executable living under
C:\Program Files\WindowsApps\..., but from the user side the core problem is that Codex exposes a command that cannot be executed. - Possibly related to issue #13542, but I am filing a separate report here with full template information and a complete Windows reproduction.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗