Permission mode
Definition
A setting in a coding agent that decides which actions it may take on its own, such as edits or shell commands, and which need approval.
In more detail
Agents differ in names but share the idea. Claude Code has default (shown as Manual), which asks before edits and commands, acceptEdits, plan, auto, dontAsk and bypassPermissions. In auto mode a classifier checks each action in the background instead of asking you, and deny rules in settings still block in every mode. Codex pairs approval policies with sandbox modes such as read-only and workspace-write.
Pick the narrowest mode that lets the task finish. Fully automatic modes are reasonable inside a disposable container or dev container with no secrets; on your own machine with production credentials they turn every prompt injection into a possible incident.
Related terms
Human in the loop
A design in which a person reviews or approves an AI system's actions or outputs at defined points before they take effect.
Least privilege
Granting an agent or tool only the permissions and data access its task requires, and nothing more, so a mistake does less damage.
Plan mode
An agent mode in which it reads and researches the code and proposes a plan, without editing any files until you approve the plan.
Sandbox
An isolated environment that limits what an agent or its code can read, write or reach on the network, so any mistakes stay contained.
Dev container
A container defined by a devcontainer.json file that gives a project a reproducible environment, often used to sandbox agents.
Read more about Permission mode
- Claude Code auto mode: what the classifier allows and when to turn it off
How Claude Code auto mode decides which tool calls run without a prompt, how CLAUDE.md, ask and deny rules steer it, and when plan mode or a sandbox is safer.
- Your first session with Claude Code
Install it, run it in a real repository, approve its first changes, commit a reviewed edit and learn the commands you will use daily.
- Your first session with the Codex CLI
Install it, choose a sandbox and approval mode, give it a well-scoped task in a repository and review its changes before you accept.
- AI security
Defending against prompt injection, data leakage and over-permissioned agents.