'Yes, and don't ask again for commands that start with' too narrow
Resolved 💬 7 comments Opened Jan 6, 2026 by AprilGrimoire Closed Jan 13, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.77.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.2
What platform is your computer?
Linux 6.18.1-gentoo x86_64 AMD Ryzen 7 8845H w/ Radeon 780M Graphics
What issue are you seeing?
Yes, and don't ask again for commands that start with `ls -la /home/april/.config/hypr`
What steps can reproduce the bug?
Uploaded thread: 019b9228-130e-7642-a093-18b1f0581bf5
What is the expected behavior?
Yes, and don't ask again for commands that start with `ls`
Additional information
Hopefully there should be other restriction, for example ls > /lib64/ld-linux-x86-64.so.2 would be devastating.
7 Comments
still on 0.78.0
@etraut-openai may I work on this bug?
My approach is like this way -
Modify both functions to use only the first token (base command) instead of the full commandChange will be affected
try_derive_execpolicy_amendment_for_prompt_rules()andtry_derive_execpolicy_amendment_for_allow_rules()function, let me know if I can put with this suggestion.Thank you
The parameters for a command can greatly impact what it does. For example,
rm fooandrm -rf .have very different effects, so we can't use just the first token.If you want finer-grained control over commands that you allow, you can check out our recently-added support for execution policy rules.
Why don't let the model decide what generality of no prompt to suggest?
Every other CLI editing tool handles this gracefully. If it requests too broad a command, the user will just reject and explain why.
As it is, it's a useless option as it uses the entire command as "...commands that start with..."
Like, this is baffling, how is this not solved? It makes the CLI completely useless as I need to approve EVERY SINGLE COMMAND it tries to execute, unless it's doing EXACTLY the same operation again.
And it's the same every time it tries to save a file:
Should I really have to approve every file to be written to? Why don't you let me approve writing to files for the session, and for all files inside the working directory? Is this not the entire point of the tool?!
What am I missing?
Also happy to work on this
Please @jamesxsc, be the hero we need!