Windows: bundled rg in Codex Desktop resolves on PATH but fails with Access Denied in integrated PowerShell
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 -Allrg --version
- Observe that
rgpoints 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.exefile 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
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
- #10090
- #9062
Powered by Codex Action
Is there any official response to this issue? Codex Windows app is unusable right now
@azarenkova-git, just to confirm, this occurs when you attempt to invoke rg manually from within the app's built-in terminal? If so, why is that blocking you from using Codex Windows?
@etraut-openai Codex gives me the error that rg is not usable in this shell and falls back to PowerShell file search. Meanwhile, it works just fine in the VS Code extension. The rg bundled with the app is stored in C:/Program Files/WindowsApps which it is not able to access.
Can confirm
rg -n "GameThreadWaitForTask|STAT_GameIdleTime|Frame Sync Time|FrameEndSync|FFrameEndSync|Sync\(" Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp
ResourceUnavailable:
Line |
2 | rg -n "GameThreadWaitForTask|STAT_GameIdleTime|Frame Sync Time|FrameE …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Program 'rg.exe' failed to run: An error occurred trying to start process 'C:\Program Files\WindowsApps\OpenAI.Codex_26.311.2262.0_x64__2p2nqsd0c76g0\app\resources\rg.exe' with working directory 'D:\unrealengine5'. 拒绝访问。At line:2 char:1
+ rg -n "GameThreadWaitForTask|STAT_GameIdleTime|Frame Sync Time|FrameE …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
error occurs while agent using rg.exe, just like apply_patch, they're no permission to execute
I hit the same issue and wanted to share what happened on my machine.
Environment:
- Codex Desktop on Windows
rginitially resolved to the bundled binary underC:\Program Files\WindowsApps\OpenAI.Codex_...\app\resources\rg.exe- Running
rg --versionfailed withAccess is denied
What worked for me:
- Installed ripgrep separately with:
winget install --id BurntSushi.ripgrep.MSVC -e - In the current shell, the newly installed
rg.execould be invoked directly by full path. - However, fresh Codex shell sessions still picked the bundled WindowsApps
rgat first. - After restarting the Codex app, PATH was refreshed correctly and
rgstarted resolving to the winget-installed binary instead of the bundled one.
So on my side, the practical fix was:
- install ripgrep separately
- restart Codex Desktop so the new PATH is picked up cleanly
That was enough; no permanent wrapper was needed in the end.
I had a similar issue with the same error message, I'm not sure if it had the same source though. I was able to fix it by adding the following to the custom instructions in the settings:
- When running shell commands on Windows, normalize workdir by stripping a leading \?\ prefix before execution.
I hit the same issue and wanted to share what happened on my machine.
Environment:
* Codex Desktop on Windows * `rg` initially resolved to the bundled binary under `C:\Program Files\WindowsApps\OpenAI.Codex_...\app\resources\rg.exe` * Running `rg --version` failed with `Access is denied`What worked for me:
1. Installed ripgrep separately with: `winget install --id BurntSushi.ripgrep.MSVC -e` 2. In the current shell, the newly installed `rg.exe` could be invoked directly by full path. 3. However, fresh Codex shell sessions still picked the bundled WindowsApps `rg` at first. 4. After restarting the Codex app, PATH was refreshed correctly and `rg` started resolving to the winget-installed binary instead of the bundled one.So on my side, the practical fix was:
* install ripgrep separately * restart Codex Desktop so the new PATH is picked up cleanlyThat was enough; no permanent wrapper was needed in the end.
I can confirm that. I had the same problem (on two computers), and this solution worked right away.
I can also confirm that.
Setting the PATH variable didn't work for me. But giving my user full access to the "resources" folder did the trick. In my case, this is
C:\Program Files\WindowsApps\OpenAI.Codex_26.325.3894.0_x64__2p2nqsd0c76g0\app\resources
I also get this very frequently, Codex falls back to PowerShell search.
I also get this very frequently, Codex falls back to PowerShell search.
You should really force it to use rg it is a much much smoother experience. make sure its installed and in path ects.
i also added a line in the always promt use rg becouse else it wil sometimes not try that first, i think becouse somewhere its remembering that its not working or whatever.
I told codex to copy rg to apply_patch path, just working. some other PATH should work as well.
I also get this very frequently, Codex falls back to PowerShell search.
I get it whenever I start a session lol. What is OpenAI doing?
They're vibe coding.
On the other note, for me, administrative sandbox failed to set up and even though I had given full access this is still happening
On Sat, 18 Apr 2026, 20:16 Sazid Al Bayazid @.***> wrote:
albayazid left a comment (openai/codex#13542) https://github.com/openai/codex/issues/13542#issuecomment-4274199652
I also get this very frequently, Codex falls back to PowerShell search.
I get it whenever I start a session lol. What is OpenAI doing?
— Reply to this email directly, view it on GitHub https://github.com/openai/codex/issues/13542?email_source=notifications&email_token=ATD6MCHPYNNJ5GOGEIYVDA34WOZ6JA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRXGQYTSOJWGUZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4274199652, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATD6MCBLYGFWVWOZRNHR2VD4WOZ6JAVCNFSM6AAAAACWHRINOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DENZUGE4TSNRVGI . You are receiving this because you commented.Message ID: @.***>
I the same problem in both the VS Code extension and the stand-alone Codex app. Every conversation starts with this error.
Installing RipGrep separately does not work around for me:
Codex, please run rg with --version for testing purposes
rg --version did not run successfully here.
PowerShell resolves rg to: C:\Users\REDACTED\AppData\Local\Microsoft\WinGet\Links\rg.exe
That path is a symbolic link to: C:\Users\REDACTED\AppData\Local\Microsoft\WinGet\Packages\BurntSushi.ripgrep.MSVC_Microsoft.Winget.Source_8wekyb3d8bbwe\ripgrep-15.1.0-x86_64-pc-windows-msvc\rg.exe
What happened:
Invoking rg via the WinGet link failed with: No application is associated with the specified file for this operation Invoking the real binary directly failed with: Access is denied
I can run 'rg' fine from a PowerShell myself.
This is still an on going issue it seems and still exists
It very much is