I’m using Codex in allowed repositories with permissions set to auto-approve. I’ve noticed that when Codex needs to run CLI commands or similar actions, it often first hits a sandbox permission error, then retries with an elevated permission request, gets auto-approved, and only then runs the command.
Is there a way to configure Codex so that, when auto-approval is enabled, it requests elevated permissions upfront for commands that need them?
I tried adding this to the instructions, but the results are inconsistent and the logic gets messy. Maybe I’m missing a setting or a better approach.
I run into the same dilemma. After trying several tools and having similar results, I just live with it.
From reading many Codex issues, the problem also seems to vary depending on how Codex is being run. I am not sure of all the currently supported ways to run Codex, but personally I use it on Windows 11 through VS Code with the Codex extension.
Something related I learned of yesterday but have not had a chance to try is the slash command/goal
/goal Purpose: Set or view an experimental goal for a long-running task. When to use it: Give Codex a persistent target to track while a larger task runs. Requires features.goals.
That’s pretty much similar runtime for me except that I’m on JetBrains IDEs. When the auto-approve mode is not enabled, Codex, when hitting the sandbox permission, it gives you the option to authorize it once or multiple times. If you authorize it from now on, that stops being a problem. The issue is when you have a lot of commands. Auto-approve mode is more self-running, but then you can hit that thing every time because the auto-approve mode allows those comments only once. So each time it has to request the approval again. Ideally you would have some sort of a control over how the auto-approval works, maybe even some instructions somewhere, where you can say that for this type of commands please approve them “from now on” instead of approving it “once”. But then I didn’t look specifically into the documentation or other things so I can’t tell for sure. Maybe it is already somewhere baked in.