What are permission modes in coding agents?
Permission modes are a coding agent’s presets for what it may do without asking you: read files, edit them, run commands or reach the network. Claude Code calls them permission modes; Codex combines an approval policy with a sandbox mode.
Claude Code’s permission modes
Press Shift+Tab to cycle through them, start in one with claude --permission-mode, or set a default with permissions.defaultMode in a settings file.
- default (also called Manual): asks before most edits, shell commands and network actions.
- acceptEdits: approves file edits and common file commands such as mkdir, mv and cp inside the working directory.
- plan: Claude researches and proposes a plan but can’t change source files until you approve it.
- auto: a classifier model reviews each action in your place, so most run without a prompt; after repeated blocks it goes back to asking. Recent versions start interactive sessions in auto where it’s available.
- dontAsk: denies anything that would otherwise prompt; meant for CI and locked-down scripts.
- bypassPermissions (the --dangerously-skip-permissions flag): skips prompts and safety checks; meant only for isolated containers or VMs.
Codex: approval policy and sandbox
Codex splits the question in two: when to ask you (the approval policy) and what commands can technically reach (the sandbox, enforced by the operating system with Seatbelt on macOS and bwrap with seccomp on Linux).
- Sandbox modes: read-only, workspace-write (edits inside the workspace) and danger-full-access. Network access is off by default.
- Approval policies: on-request asks when the agent needs to step outside the sandbox; never doesn’t ask at all.
- The Auto preset (workspace-write with on-request) is what Codex uses in a version-controlled folder; /permissions switches mode during a session.
- approvals_reviewer = "auto_review" sends eligible approval requests to a reviewer agent instead of you.
- --yolo, short for --dangerously-bypass-approvals-and-sandbox, turns off both; OpenAI doesn’t recommend it.
Why it matters for unattended runs
An agent left alone overnight or in CI can’t wait for a click: a prompt nobody answers stalls it for hours, while skipping every check lets one bad command do real damage. The usual answer is to remove the prompts and keep the guardrails somewhere else.
- Run in a sandbox, container or VM that only sees the project, not your SSH keys or home folder.
- Pre-approve safe commands with allow rules and deny the destructive ones, such as git push, rm -rf and deploys.
- Let the agent commit to a branch but not push, and review it in the morning.
- In CI, use the non-interactive options: dontAsk in Claude Code, or codex exec with an explicit sandbox.
Choosing a mode
Use plan mode to agree on an approach before a large change, default or acceptEdits while you’re at the keyboard, and auto or a sandboxed preset for long runs you only check on now and then. Keep the bypass options for throwaway environments. Our guide to running Claude Code overnight walks through a full setup.
Where AgentVera fits
AgentVera works alongside these modes rather than replacing them: auto approval answers Claude Code’s safe requests such as reads and tests while git push and rm always come to you (Pro and Team), waiting agents gather in one approval queue, and a Claude Code or Codex agent can run in a Docker container that only sees the project folder.
- Auto approvalApprove Claude Code’s safe requests without asking; risky ones still come to you.
- Night shiftQueue tasks in the evening and give each to an agent; agents work overnight and you get a morning report.
- Agents in DockerRun a Claude Code or Codex agent in a Docker container that only sees the project folder.
FAQ
Which permission mode is the safest?
plan mode in Claude Code, since it can’t edit source files until you approve the plan, and the read-only sandbox in Codex. What the machine exposes matters as much as the mode, so isolation helps too.
Is auto mode the same as bypassPermissions?
No. In auto mode a classifier still reviews each action and can block it; bypassPermissions skips the checks entirely.
Can I set a default mode?
Yes. In Claude Code, set permissions.defaultMode in a settings file. In Codex, set sandbox_mode and approval_policy in config.toml, or pass --sandbox and --ask-for-approval.
How do I let an agent run unattended safely?
Give it a sandbox or container, pre-approve only safe commands, block pushes and deploys, and review its branch afterwards.