What version of Codex CLI is running?
codex-cli 0.114.0
What subscription do you have?
ChatGPT
Which model were you using?
No response
What platform is your computer?
No response
What terminal emulator and version are you using (if applicable)?
No response
What issue are you seeing?
I recently updated codex from v0.112.0 to v0.114.0.
Now, even with the --dangerously-bypass-approvals-and-sandbox option, I always see the confirmation prompt like below every time I run codex in a new directory:
> You are in /home/user/workdir/some_project
Do you trust the contents of this directory? Working with untrusted contents comes with higher risk of prompt
injection.
› 1. Yes, continue
2. No, quit
This is annoying because of three reasons:
-
I just don't want the prompt. That defeats the purpose of using the --dangerously-bypass-approvals-and-sandbox option.
-
I use codex in a Docker container. For extra safety, I mount config.toml readonly to the container. So, even if I select 1 in the prompt above, the selection is not recorded.
-
I test a one-off script very often (e.g. 15 times a day). Every time I do that, I create a new temporary directory with a random name (e.g. mkdir ~/my_playground/${RANDOM}). So registering every possible directories to the trust directories list in advance is not feasible.
What steps can reproduce the bug?
-
Create a new directory.
-
cd to the directory.
-
Run codex --dangerously-bypass-approvals-and-sandbox.
What is the expected behavior?
Additional information
Possible cause:
What version of Codex CLI is running?
codex-cli 0.114.0
What subscription do you have?
ChatGPT
Which model were you using?
No response
What platform is your computer?
No response
What terminal emulator and version are you using (if applicable)?
No response
What issue are you seeing?
I recently updated
codexfromv0.112.0tov0.114.0.Now, even with the
--dangerously-bypass-approvals-and-sandboxoption, I always see the confirmation prompt like below every time I runcodexin a new directory:This is annoying because of three reasons:
I just don't want the prompt. That defeats the purpose of using the
--dangerously-bypass-approvals-and-sandboxoption.I use
codexin a Docker container. For extra safety, I mountconfig.tomlreadonly to the container. So, even if I select1in the prompt above, the selection is not recorded.I test a one-off script very often (e.g. 15 times a day). Every time I do that, I create a new temporary directory with a random name (e.g.
mkdir ~/my_playground/${RANDOM}). So registering every possible directories to the trust directories list in advance is not feasible.What steps can reproduce the bug?
Create a new directory.
cdto the directory.Run
codex --dangerously-bypass-approvals-and-sandbox.What is the expected behavior?
It should trust any directory by default as before.
Or, at least there should be both of these:
another option to trust all directories by default (e.g.
--dangerously-trust-any-directories)breaking change notice / migration guide in the release note
Additional information
Possible cause: