You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex in PowerShell should handle a prefix for a command correctly #8537
I have to approve every form of "dotnet" command in PowerShell; I want to be able to approve all commands that start with "dotnet" in PowerShell, but the rules checking isn't actually a "prefix" check, it's a full-string check.
Here's an example rule (that I manually created) from my default.rules file:
I want to be able to approve all commands that start with "dotnet" in PowerShell, but the StarLark rules checking isn't actually a "prefix" check, it's a full-string check.
Additional information
The instructions in this issue template for Windows users to gather the version information should be $([Environment]::OSVersion | ForEach-Object VersionString) + ' ' + $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" }). Notice the + ' ' + added between the two $() expressions.
Reacted by Justin Russell, Arthur Stramkals, detuned, Quan Ran, notargs, Edward Ziemiński, Brendan Ratter, deg-hrisser, Xinyue Lu, msloan and 5 more
This is killing me! I am using the Windows Sandbox and it needs to escalate privileges for commands for tools like “agent-browser” but as the OP said, I can’t just use prefix with agent-browser or even “agent-browser snapshot” as it must be exact match like “agent-browser snapshot -i”.
I believe it’s because it is invoking with prefix params like [“powershell_path", "-Command", “the actual cmd to run”] and the way it works doesn’t allow “the actual cmd to run” to match just a prefix as it requires the full command.
I am thinking maybe something to do with the third param or something because if I just do [“powershell_path", "-Command"] that works as a “prefix” as it let’s everything bypass the sandbox elevated privileges and approves all commands.
Examples
Here are some entries that get added to the default.rules when you ask it to "always approve" in the Codex App GUI:
The main problem is things like the agent-browser click commands because they are going to have a specific element reference to click and unless you add every single potential name (e.g., @e17 etc.) then you are going to constantly have to approve the commands.
My expectation is that the below should work as a "prefix" to allow anything after agent-browser click, but it does not work.
Coming from half a year later.
It is genuinely hard to believe that this very basic design issue, which has a significant negative impact on the user experience, has seen no progress at all in half a year.
I have already seen a number of similar issues, and none of them has had any substantive progress — not even a viable workaround.
It is difficult to understand how such a poor user experience can exist in something being built as the absolute core of OpenAI’s product.
Reacted by Message00, kraybit, Lukasz Balukin, msloan, Caio Taulois and GTOL
Activity
arthur-st commentedon Feb 8, 2026
Can confirm this behavior with Codex v0.98.0 and PowerShell 7.5.4. OS build 26100.7462.
GitMurf commentedon Mar 16, 2026
This is killing me! I am using the Windows Sandbox and it needs to escalate privileges for commands for tools like “agent-browser” but as the OP said, I can’t just use prefix with agent-browser or even “agent-browser snapshot” as it must be exact match like “agent-browser snapshot -i”.
I believe it’s because it is invoking with prefix params like [“powershell_path", "-Command", “the actual cmd to run”] and the way it works doesn’t allow “the actual cmd to run” to match just a prefix as it requires the full command.
I am thinking maybe something to do with the third param or something because if I just do [“powershell_path", "-Command"] that works as a “prefix” as it let’s everything bypass the sandbox elevated privileges and approves all commands.
Examples
Here are some entries that get added to the
default.ruleswhen you ask it to "always approve" in the Codex App GUI:The main problem is things like the
agent-browser clickcommands because they are going to have a specific element reference to click and unless you add every single potential name (e.g.,@e17etc.) then you are going to constantly have to approve the commands.My expectation is that the below should work as a "prefix" to allow anything after
agent-browser click, but it does not work.And yes I have tried all the different variations like separating each word as an array arg like this:
bratter commentedon Mar 20, 2026
Concur that this is not the ideal behavior!
msg7086 commentedon Mar 26, 2026
Hope this get resolved soon and I don't have to sit there and keep clicking allow for git add and git commit.
petitchamp commentedon Apr 24, 2026
I am also facing this problem. codex keeps asking me for approval. Still no fix ?
Message00 commentedon May 1, 2026
Coming from half a year later.
It is genuinely hard to believe that this very basic design issue, which has a significant negative impact on the user experience, has seen no progress at all in half a year.
I have already seen a number of similar issues, and none of them has had any substantive progress — not even a viable workaround.
It is difficult to understand how such a poor user experience can exist in something being built as the absolute core of OpenAI’s product.
srcejon commentedon May 7, 2026
@codex can you vibe a fix for us?