← Blog

How-to5 min read

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.

Two coding agents running side by side in Mirasim, each in its own paneTwo coding agents running side by side in Mirasim, each in its own pane

The short answer

You wantClaude CodeCodex
To approve things yourself--permission-mode default--sandbox read-only --ask-for-approval on-request
Edits without asking, still asked for risky thingsacceptEdits, or auto with its background checksThe Auto preset: workspace-write + on-request (the default in a git folder)
To plan before any change--permission-mode planread-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

ModeRuns without askingGood for
default (manual)Reading files in your working directoriesSensitive work, unfamiliar code
acceptEditsReads, file edits, and file commands such as mkdir, mv and cpIterating on code you're reviewing
planReads; edits wait until you approve a planExploring before changing anything
autoEverything, with a classifier model checking each action firstLong tasks, fewer prompts
dontAskOnly pre-approved tools; anything that would prompt is deniedLocked-down CI and scripts
bypassPermissionsEverythingIsolated 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 set permissions.defaultMode in 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 rm commands.

What --dangerously-skip-permissions does

These two are the same
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 -p with 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.

SetupFlagsWhat happens
Auto (the preset)--sandbox workspace-write --ask-for-approval on-requestReads, 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-requestReads and runs commands in a read-only sandbox
Read-only for CI--sandbox read-only --ask-for-approval neverNever asks; stays read-only
Full access--dangerously-bypass-approvals-and-sandbox, alias --yoloNo 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, .codex and .agents inside 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.

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.

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 never and 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.allow in settings.json. In Codex, the Auto preset already runs commands in the workspace without asking.

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