Claude Code and Codex permission modes: auto, plan, --dangerously-skip-permissions and --yolo
What each Claude Code and Codex permission mode allows without asking, what --dangerously-skip-permissions and --yolo turn off, and safer ways to get fewer prompts.


The short answer
| You want | Claude Code | Codex |
|---|---|---|
| To approve things yourself | --permission-mode default | --sandbox read-only --ask-for-approval on-request |
| Edits without asking, still asked for risky things | acceptEdits, or auto with its background checks | The Auto preset: workspace-write + on-request (the default in a git folder) |
| To plan before any change | --permission-mode plan | read-only, switched with /permissions |
| No checks at all | --dangerously-skip-permissions (bypassPermissions) | --yolo (--dangerously-bypass-approvals-and-sandbox) |
Both vendors say the last row is for isolated environments only, such as a container or a virtual machine, because the agent can then change or delete anything it can reach. Most people who reach for it want fewer prompts, which auto mode in Claude Code and the Auto preset in Codex already give.
Claude Code's permission modes
| Mode | Runs without asking | Good for |
|---|---|---|
| default (manual) | Reading files in your working directories | Sensitive work, unfamiliar code |
| acceptEdits | Reads, file edits, and file commands such as mkdir, mv and cp | Iterating on code you're reviewing |
| plan | Reads; edits wait until you approve a plan | Exploring before changing anything |
| auto | Everything, with a classifier model checking each action first | Long tasks, fewer prompts |
| dontAsk | Only pre-approved tools; anything that would prompt is denied | Locked-down CI and scripts |
| bypassPermissions | Everything | Isolated containers and VMs only |
- Press Shift+Tab in a session to cycle modes; the status bar shows the current one. To start in a mode, pass
--permission-mode <mode>, or setpermissions.defaultModein settings.json. - Since v2.1.283, new terminal and VS Code sessions start in auto mode by default. Auto needs a supported model, and an organization can turn it off; when it isn't available, the session starts in manual mode.
- Deny rules block in every mode, bypassPermissions included. Some things are never approved automatically in any mode, such as tools matched by an ask rule and recognized dangerous
rmcommands.
What --dangerously-skip-permissions does
claude --dangerously-skip-permissions
claude --permission-mode bypassPermissions- It turns off permission prompts and safety checks, so tool calls run at once, including writes to protected paths.
- The first time, Claude Code shows a dialog asking you to accept responsibility; if you accept, it remembers that in your user settings, and if you decline, it exits.
- You can't switch into it mid-session; the session has to start with it.
- Anthropic's advice: use it only in containers, VMs or dev containers without internet access, where Claude Code can't damage your computer. For unattended runs, pair
claude -pwith it inside such a container; in CI with a fixed list of allowed tools,--permission-mode dontAsk --allowedTools …is the safer fit.
Codex: sandbox and approvals
Codex splits this into two settings. The sandbox decides what Codex can technically do, such as where it can write and whether it can reach the network. The approval policy decides when it must ask you first.
| Setup | Flags | What happens |
|---|---|---|
| Auto (the preset) | --sandbox workspace-write --ask-for-approval on-request | Reads, edits and runs commands in the workspace; asks before editing outside it or using the network |
| Read-only | --sandbox read-only --ask-for-approval on-request | Reads and runs commands in a read-only sandbox |
| Read-only for CI | --sandbox read-only --ask-for-approval never | Never asks; stays read-only |
| Full access | --dangerously-bypass-approvals-and-sandbox, alias --yolo | No sandbox and no approvals; OpenAI doesn't recommend it |
- When you start Codex in a git folder it recommends Auto; outside version control it recommends read-only. Switch in a session with
/permissions, and check which folders count as the workspace with/status. -a never(--ask-for-approval never) turns off prompts but keeps whichever sandbox you chose, which is a middle ground between Auto and --yolo.- Even in workspace-write,
.git,.codexand.agentsinside the workspace stay read-only. - To have fewer prompts without --yolo, set
approvals_reviewer = "auto_review"in config.toml: a reviewer agent answers eligible approval requests for you. It uses extra model calls.
Article · Codex config.toml: where it is, and the settings worth changing → Set the sandbox and approval policy once in config.toml.
Answering permission requests in Mirasim
Mirasim runs Claude Code, Codex and other coding agents in one window. When a session needs your permission, the turn island shows a card with Allow once, Allow for this session and Deny, so you can answer without finding the right terminal. The Mirasim phone app answers the same requests, so a long task doesn't sit waiting while you're away from your desk.
Chapter 6 · Parallel sessions › The turn island: see and answer your agents from the top of the screen → Docs, chapter 6: the turn island and answering requests from it.
Chapter 21 · Claude Code and Codex on your phone, other computers and SSH servers › Use your computer's agents from your phone → Docs, chapter 21: answering questions and permission requests from the phone app.
Questions
- Is --dangerously-skip-permissions safe?
- On your own computer, no: Claude Code runs every tool call without asking. Anthropic recommends it only in isolated environments without internet access. Auto mode is the built-in way to get few prompts with checks still on.
- What's the difference between auto mode and bypassPermissions?
- Both run without routine prompts. Auto has a separate classifier model review each action before it runs and block the ones it judges risky; bypassPermissions has no such check.
- What does Codex --yolo turn off?
- Both layers: there's no sandbox and no approval prompts. If you only want no prompts, use
-a neverand keep a sandbox. - How do I stop being asked about the same command?
- In Claude Code, answer “Yes, and don't ask again”, or add the command to
permissions.allowin settings.json. In Codex, the Auto preset already runs commands in the workspace without asking.
Article · Claude Code settings.json: where it is, which file wins, and the settings worth changing → Claude Code settings.json: permission rules and the default mode.
Article · How to use Claude Code: your first session, permission modes, and undoing changes → How to use Claude Code: your first session and the commands you'll use.
Sources
Checked on November 26, 2026 against Anthropic's Claude Code documentation (code.claude.com/docs, Choose a permission mode) and OpenAI's Codex documentation (learn.chatgpt.com/docs, Agent approvals & security). Both change often, so check those pages for the latest modes and flags.
Keep reading

Code review with Claude Code and Codex: /review, GitHub reviews and a second opinion
Code review with Claude Code and Codex: /review for local changes, automatic GitHub PR reviews, where review rules go, and a second opinion from the other agent.

Hooks in Claude Code and Codex: run your own commands when the agent acts
What hooks are in Claude Code and Codex, where they go, when they fire, and examples: a notification, formatting after edits, blocking edits to protected files.

Subagents in Claude Code and Codex: what they are and how to make your own
What subagents are in Claude Code and Codex, when they help, how to define your own in .claude/agents or .codex/agents, and how to call one.