# Codex auto mode: how approval policies and the sandbox work

> How to make OpenAI Codex ask for approval less: the approval policy, sandbox modes and auto-review explained, with safe settings for everyday work.

Canonical: https://herdbell.com/blog/codex-auto-mode-approvals
Author: Herdbell team
Published: 2026-11-25
Last updated: 2026-11-25

Codex does not have a single "auto mode" switch. How often it asks you depends on two settings that work together: the **sandbox** (what Codex is allowed to touch) and the **approval policy** (when it stops to ask). This page explains both, as of November 2026. Codex changes often, so check `codex --help` and the official Codex documentation for the exact names in your version.

## The two settings

| Setting | Controls | Common values |
|---|---|---|
| Sandbox (`--sandbox`) | Which files and network Codex can use | `read-only`, `workspace-write`, `danger-full-access` |
| Approval policy (`--ask-for-approval`) | When Codex stops and asks you | `on-request`, `never` (and others, depending on version) |

You can set both on the command line or in `~/.codex/config.toml` with `sandbox_mode` and `approval_policy`, so they apply every time.

## Three setups, from careful to hands-off

1. **Everyday:** `workspace-write` with `on-request`. Codex can edit your project, and asks before anything outside it. This is the usual choice.
2. **Fewer prompts:** keep `workspace-write` and turn on auto-review, which hands approval requests to a reviewer agent instead of you. It does not widen what Codex is allowed to touch.
3. **No prompts:** `never`. Codex runs everything without asking. Keep this for a throwaway container or a project you can restore from git.

## Staying safe while asking less

For more, see the [AI coding agent safety checklist](https://herdbell.com/blog/ai-coding-agent-safety-checklist). If you run Codex all day, also see [when Codex usage limits reset](https://herdbell.com/blog/codex-usage-limit-reset).

- Keep the sandbox on `workspace-write` so Codex stays inside your project.
- Commit before a long task, so you can undo anything.
- Use `danger-full-access` only when you understand why you need it.

## Answer Codex approvals from anywhere

The other way to ask less is to make each answer faster. Herdbell shows Codex approval requests as a card at your cursor in any app: press **Return** to allow or **D** to deny, and you can tap Codex's multiple-choice answers there too. See [Codex notifications when a task finishes](https://herdbell.com/blog/codex-notifications-when-task-finishes).

## Common questions

### How do I enable auto mode in Codex?
There is no single switch. Use `workspace-write` with `on-request` for everyday work, add auto-review for fewer prompts, or set the approval policy to `never` only in a throwaway environment.

### Is --full-auto still available in Codex?
Older versions used `--full-auto` as a shortcut for workspace-write plus on-request. Newer versions may not accept it, so check `codex --help`.

### Where do I set the Codex approval policy permanently?
In `~/.codex/config.toml`, with `approval_policy` and `sandbox_mode`.

### Is approval policy never safe?
Only somewhere you can throw away or restore, because Codex runs every command without asking.

## Related
- [Herdbell: pricing](https://herdbell.com/#pricing)
- [All posts](https://herdbell.com/blog)
- [How to stop Claude Code and Codex asking for permission every time (safely)](https://herdbell.com/blog/stop-ai-coding-agent-asking-permission)
- [How to know when OpenAI Codex finishes a task or needs your approval](https://herdbell.com/blog/codex-notifications-when-task-finishes)
- [How to set the model and effort (Low, Medium, High) for Claude Code and Codex](https://herdbell.com/blog/set-claude-code-and-codex-model-and-effort)
- [AI agent permission approvals, explained](https://herdbell.com/blog/ai-agent-permission-approvals-explained)
