Allow list for commands instead of danger-full-access + deny list
Resolved 💬 5 comments Opened Feb 24, 2026 by mycatnamedweb Closed Apr 3, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
CLI
What feature would you like to see?
Currently I have to use Codex with full access and provide a deny list of commands instead the default rules inside the .codex folder. It would be much better from a corporate adoption perspective if instead I could provide a whitelist instead, so that every other command is blocked by default. Much needed in highly regulated environments.
Additional information
_No response_
5 Comments
What you're describing is possible today with rules. You can enable the sandbox to restrict writes only to your project and define rules to whitelist specific tool calls so they run outside of the sandbox. You can also use cloud-managed requirements to enforce rules for users across the organization.
Our environment uses RHEL8 - Landlock is unavailable, so Codex falls back to danger-full-access. Because of that, we rely heavily on strict rules + web search disabled to keep execution constrained.
So the issue/improvement request is that you cannot use an allow list (instead of a deny list) while running in danger-full-access
This feature request hasn't received enough upvotes, so closing.
This is the biggest issue stopping me from switching to Codex from Claude Code. I think this should be considered.
@muddi900, please take a look at the rules configuration mechanism. If that doesn't meet your needs, please open a new feature request. We generally prioritize feature requests based on community feedback (upvotes).