Guide coding-agents/
How coding agents ask permission: approval modes by agent
Mode names, starting defaults, rule files, MCP approvals and admin locks for Claude Code, Codex CLI, Gemini CLI, Grok Build and VS Code Copilot, from each vendor's docs.
Short answer
Each coding agent has named modes that set when it stops to ask. Claude Code has default, acceptEdits, plan, auto, dontAsk and bypassPermissions. Codex CLI pairs a sandbox mode with an approval policy such as on-request or never. Gemini CLI takes --approval-mode with default, auto_edit, plan or yolo. Grok Build (formerly Cursor) has Auto-review, Allowlist and Run Everything. VS Code Copilot sessions offer Manual, Assisted and Allow all.
Checked against: Anthropic’s permission modes and permissions pages; OpenAI’s approvals and security, rules and managed configuration pages; Gemini CLI’s configuration and policy engine references; Grok Build’s run modes and permissions.json pages; and VS Code’s approvals and enterprise AI settings pages, December 6, 2026.
Run by us: no. Commands and mode names are copied from each vendor’s docs.
What approval modes does each coding agent have?
All five agents name their modes, but Codex sets two values, a sandbox mode and an approval policy, where the other four expose a single mode.
| Agent | Modes, as named in the docs | Starting mode | How to switch |
|---|---|---|---|
| Claude Code | default (Manual), acceptEdits, plan, auto, dontAsk, bypassPermissions |
auto in a terminal or the VS Code extension on v2.1.283 or later; default for claude -p and the Agent SDK |
Shift+Tab, or claude --permission-mode <mode> |
| Codex CLI | Sandbox read-only, workspace-write or danger-full-access, plus approval policy on-request, never or granular |
Recommends Auto (workspace-write with on-request) in version-controlled folders and read-only elsewhere |
/permissions, or --sandbox and --ask-for-approval (-a) |
| Gemini CLI | default, auto_edit, plan, yolo |
default |
Shift+Tab cycles default, auto_edit and plan; Ctrl+Y toggles YOLO; --approval-mode <mode> |
| Grok Build (Agents Window) | Auto-review, Allowlist, Run Everything | Auto-review, the recommended default since 3.6 (May 29, 2026) | Settings > Agents > Approvals & Execution |
| VS Code, Copilot harness | Manual permissions, Assisted permissions, Allow all | Manual permissions | Permissions picker in the chat input, or chat.defaultConfiguration |
This is a feature reference, not a ranking. Defaults and names are as of December 6, 2026.
A few details the table can’t hold:
- Codex no longer supports
approval_policy = "untrusted"; OpenAI says the retired value can stop the client from starting. Beta permission profiles (:read-only,:workspace,:danger-full-access, set withdefault_permissions) are an alternative tosandbox_mode; the two don’t combine. - Gemini CLI accepts only
default,auto_editandplaningeneral.defaultApprovalMode. YOLO “can only be enabled via command line.”auto_editapproves edit tools (replace,write_file) and prompts for others. - VS Code treats Autopilot as a separate mode that keeps the agent working across turns, “not a fourth permission level.” The Claude and Codex harnesses in VS Code have their own modes (Ask Before Edits through Bypass Permissions; Default Permissions, Auto-Review, Full Access). The deprecated Local harness has Default permissions, Allow all and Autopilot (Preview).
Which modes skip approval prompts entirely?
Every agent has one, and every vendor attaches a warning to it.
| Agent | No-prompt setting | What still applies, per the docs |
|---|---|---|
| Claude Code | bypassPermissions, or --dangerously-skip-permissions |
Deny rules, explicit ask rules and a short list of actions no mode auto-approves. Anthropic lists it for “Isolated containers and VMs only” |
| Codex CLI | --ask-for-approval never; --dangerously-bypass-approvals-and-sandbox (alias --yolo) also removes the sandbox |
With never, the chosen sandbox still applies. OpenAI marks the bypass flag “not recommended” |
| Gemini CLI | --approval-mode=yolo (the --yolo flag is deprecated) |
Sandboxing turns on by default with YOLO |
| Grok Build | Run Everything | “Every tool call runs automatically,” with no sandbox |
| VS Code Copilot | Allow all for one session; chat.tools.global.autoApprove across workspaces |
Organization policy and an enabled sandbox still apply |
Which modes let a model review actions instead of you?
Four agents document a model-based reviewer that decides which actions need you.
| Agent | Reviewer mode | Notes from the docs |
|---|---|---|
| Claude Code | auto: a classifier reviews actions |
Auto mode “does not guarantee safety.” Admins can remove it with permissions.disableAutoMode |
| Codex CLI | approvals_reviewer = "auto_review" with on-request or a granular policy |
Uses extra model calls |
| Grok Build | Auto-review | “Auto-review is not a security boundary.” “The classifier can make mistakes.” |
| VS Code Copilot | Assisted permissions, steered by chat.permissions.assisted.instructions |
“The reviewer can make mistakes.” |
| Gemini CLI | Not documented |
“Not documented” means the Gemini CLI pages cited here don’t describe a reviewer mode; it doesn’t prove there isn’t one.
How do I pre-approve or block specific commands?
Each agent keeps rules in its own file and syntax.
| Agent | Where rules live | Syntax and order |
|---|---|---|
| Claude Code | permissions.allow, ask, deny in settings files |
Tool(specifier), such as Bash(npm run test *). Evaluated deny, then ask, then allow |
| Codex CLI | Starlark .rules files, such as ~/.codex/rules/default.rules |
prefix_rule with allow, prompt or forbidden. Most restrictive match wins. Experimental |
| Gemini CLI | TOML policies in ~/.gemini/policies/*.toml |
decision of allow, deny or ask_user. Highest priority wins |
| Grok Build | permissions.json: terminalAllowlist, mcpAllowlist, autoRun |
Allowlists only. autoRun instructions steer the classifier and aren’t enforced |
| VS Code Copilot | chat.tools.terminal.autoApprove in User settings; managed permissions.deny, ask, allow |
true runs, false asks. Managed rules evaluate deny, then ask, then allow |
Gemini CLI’s quick-start rule blocks a command prefix:
[[rule]]
toolName = "run_shell_command"
commandPrefix = "rm -rf"
decision = "deny"
priority = 100
Two traps from the docs: Codex checks each part of a chained command, so allowing git add doesn’t allow git add . && rm -rf /. And Gemini CLI’s workspace policy tier (.gemini/policies in a repo) “is currently non-functional,” so put rules in user or admin policies.
How are MCP tool calls approved?
Every agent lets you approve or hide MCP tools per server, with different keys.
| Agent | MCP controls |
|---|---|
| Claude Code | Rules name tools as mcp__<server>__<tool> or mcp__<server>__*. Tools marked requiresUserInteraction are never auto-approved, in any mode |
| Codex CLI | Per server in config.toml: default_tools_approval_mode (auto, prompt, writes, approve), per-tool approval_mode, enabled_tools, disabled_tools. Tools with a destructive annotation always need approval |
| Gemini CLI | "trust": true on a server “bypasses all tool call confirmations.” includeTools and excludeTools filter tools; policy rules use mcpName |
| Grok Build | mcpAllowlist entries as server:tool. MCP follows the run mode |
| VS Code Copilot | A server’s tools list limits availability but “doesn’t bypass tool approvals.” Review with Chat: Manage Tool Approval |
Setup for each agent’s MCP servers is in the Claude Code, Codex CLI, Gemini CLI, Grok Build and VS Code guides.
Can an admin lock the mode?
Yes, in all five, through each vendor’s managed configuration.
| Agent | Admin control |
|---|---|
| Claude Code | Managed settings: permissions.disableBypassPermissionsMode and permissions.disableAutoMode set to "disable"; permissions.defaultMode sets the start |
| Codex CLI | requirements.toml: allowed_approval_policies, plus allowed_permission_profiles (or allowed_sandbox_modes for legacy sandbox_mode setups) |
| Gemini CLI | System settings.json, such as /etc/gemini-cli/settings.json on Linux: security.disableYoloMode, admin.secureModeEnabled. Admin policies go in /etc/gemini-cli/policies |
| Grok Build | Team admins choose which run modes are available; team settings beat individual and project config |
| VS Code Copilot | Enterprise-managed permissions.disableBypassPermissionsMode ("disable"), permissions.disableAssistedPermissionsMode, permissions.defaultMode; the ChatToolsAutoApprove device policy |
In OpenAI’s example, leaving never out of allowed_approval_policies and danger-full-access out of allowed_sandbox_modes blocks -a never and --yolo. Gemini CLI’s admin.secureModeEnabled disallows both YOLO and “Always allow” options. On macOS and Windows, Gemini CLI’s system paths are /Library/Application Support/GeminiCli/ and C:\ProgramData\gemini-cli\.
What doesn’t an approval mode protect against?
A mode decides when the agent asks; it doesn’t limit what an approved action can reach.
- Sandboxes are separate. Claude Code’s Bash sandbox covers macOS, Linux and WSL2. Codex runs commands in an OS-enforced sandbox with network off by default. VS Code has a Sandboxing for terminal toggle. Gemini CLI’s sandbox is off by default except in YOLO.
- Allowlists match strings. Grok Build calls
permissions.json“Not a security boundary,” and VS Code says command matching “is best effort.” - Approved tools can still be misused. Prompt injection in a file or tool result can steer an agent toward a call you’d approve without reading.
Keep a human in the loop for actions you can’t undo, and give agents least-privilege credentials so an approved mistake stays small.
What to read next
Sources
- Choose a permission mode
- Configure permissions
- Agent approvals & security
- Rules
- Permissions
- Managed configuration
- Model Context Protocol
- Gemini CLI configuration
- Policy engine
- Keyboard shortcuts
- MCP servers with Gemini CLI
- Run modes
- permissions.json reference
- Agent security
- Manage approvals and permissions
- Manage AI settings in enterprise environments
- MCP configuration reference
Changelog
- First published.
Cite this page
Agents for Devs. "How coding agents ask permission: approval modes by agent." Published Dec 6, 2026. https://agentsfordevs.com/guides/coding-agent-permissions - Page: https://agentsfordevs.com/guides/coding-agent-permissions
- Markdown version: https://agentsfordevs.com/guides/coding-agent-permissions.md
- Reuse: quote or summarize with a link to this page. Reuse terms
Cite one section
- What approval modes does each coding agent have?
- Which modes skip approval prompts entirely?
- Which modes let a model review actions instead of you?
- How do I pre-approve or block specific commands?
- How are MCP tool calls approved?
- Can an admin lock the mode?
- What doesn’t an approval mode protect against?
- What to read next