Codex approval mode
Codex CLI's permission setting that controls how much autonomy the agent has, ranging from suggest to auto-edit to full-auto.
What is Codex approval mode?
Codex approval mode is the permission setting in OpenAI’s Codex CLI that controls how much autonomy the agent has. It ranges from suggest to auto-edit to full-auto, so you can decide how much Codex can do before it asks for approval. (help.openai.com)
Understanding Codex approval mode
In practice, approval mode is the guardrail that sits between a helpful coding assistant and an agent that can make changes on its own. In suggest mode, Codex can read files and propose edits or shell commands, but it waits for approval before acting. In auto-edit, it can write files automatically, while still asking before running shell commands. In full-auto, it can read, write, and execute commands inside a sandboxed environment with network access controls defined by OpenAI. (help.openai.com)
This matters because coding agents are most useful when their autonomy matches the risk of the task. A small refactor may be fine in auto-edit, while code review, learning a new repo, or sensitive changes may call for suggest mode. For longer, repetitive tasks, full-auto can reduce friction without removing the ability to scope work to the current directory. Key aspects of Codex approval mode include:
- Suggest: Codex proposes edits and commands, but waits for explicit approval.
- Auto-edit: Codex can modify files directly, while shell commands still require approval.
- Full-auto: Codex can read, write, and run commands more independently inside its sandbox.
- Task fit: Different modes suit different levels of risk, speed, and oversight.
- Workflow control: The mode can be switched in-session or by launch flags like --suggest, --auto-edit, and --full-auto.
Advantages of Codex approval mode
- Safer automation: You can keep human review in the loop when the task is sensitive.
- Faster iteration: Higher-autonomy modes reduce repetitive approval prompts.
- Flexible control: Teams can pick the right level of autonomy for each repo or task.
- Better developer focus: Codex handles the mechanical steps while you stay in the terminal.
- Clearer trust boundaries: The mode makes agent behavior explicit instead of hidden.
Challenges in Codex approval mode
- Mode selection: Teams still need judgment to choose the right autonomy level.
- Review overhead: Suggest mode can slow down workflows with frequent approvals.
- Change management: Auto-edit and full-auto require confidence in the task scope.
- Environment dependence: Full-auto behavior depends on sandbox and directory scope.
- Policy alignment: Some teams need stricter controls than a default agent workflow provides.
Example of Codex approval mode in action
Scenario: a developer wants Codex to fix a failing test suite in a local repo.
In suggest mode, Codex can inspect the failure, propose a patch, and ask before applying it. In auto-edit, it can update the test file immediately, then pause before running the test command. In full-auto, it can patch the file, run the tests, and continue iterating until the repo is green, all within the defined sandbox. That makes the mode selection itself part of the workflow design.
For a quick documentation cleanup, auto-edit may be enough. For a larger debugging session with multiple command runs, full-auto can be more efficient, especially when the task is bounded and easy to review afterward.
How PromptLayer helps with Codex approval mode
PromptLayer helps teams track, version, and evaluate the prompts that drive agent behavior, which makes it easier to compare how Codex performs under different approval settings. If you are experimenting with agent autonomy, PromptLayer gives you a place to organize prompts and observe outcomes across workflows.
Ready to try it yourself? Sign up for PromptLayer and start managing your prompts in minutes.