Claude Code
Allow all commands in any AI coding agent: Cursor, Claude Code, Codex, Gemini CLI, Copilot CLI and 7 more (2026)
How do I let an AI coding agent run commands without asking for approval?
Every major coding agent has two levers: a full auto-approve switch (Run Everything in Cursor, --dangerously-skip-permissions in Claude Code, --yolo in Codex, Gemini CLI and Copilot CLI, YOLO Mode in Cline) and a scoped allowlist that pre-approves only the commands you trust. The allowlist is the safer default. Keep the full switch for containers, VMs or throwaway projects.
Also in: 简体中文 · 日本語 · 한국어 · Español · Português (Brasil)
Claude Code settings change often
Get one email a week when a setting, flag or permission rule changes, checked against the vendor docs.
Quick answer: the full auto-approve switch per tool
- Cursor: Settings > Agents > Approvals & Execution, Run Mode = Run Everything (no sandbox, no review).
- Claude Code: claude --dangerously-skip-permissions, meant only for containers or VMs. Auto mode is the reviewed middle ground: no routine prompts while a classifier checks actions.
- OpenAI Codex CLI: --dangerously-bypass-approvals-and-sandbox, alias --yolo, removes both approvals and the sandbox.
- Gemini CLI: --yolo (same as --approval-mode yolo). It can only be turned on from the command line.
- GitHub Copilot CLI: --allow-all-tools skips tool prompts; --allow-all or --yolo turns on all permissions at once.
- Cline: Cline Settings > Features > YOLO Mode. It disables all safety checks.
- goose: GOOSE_MODE=auto, which is already the default and edits and deletes files without asking.
- Junie CLI: brave mode, toggled with /brave or Ctrl+B, or junie --brave. Level On runs all sensitive actions without asking.
- Factory Droid: droid exec --auto high for headless runs.
- OpenCode: set permission rules to allow in opencode.json.
- Kiro: allow rules in ~/.kiro/settings/permissions.yaml.
- Zed: agent.tool_permissions with default set to allow.
The safer way: pre-approve only trusted commands
Most tools let you allow specific commands while still asking for everything else. This keeps routine work like tests, linters and git reads fast without handing the agent rm, git push or cloud CLIs.
Claude Code: .claude/settings.json
{
"permissions": {
"allow": ["Bash(npm run *)", "Bash(git commit *)"],
"deny": ["Bash(git push *)"]
}
}Cursor: .cursor/permissions.json
{
"terminalAllowlist": ["git", "npm:install*", "cargo"],
"mcpAllowlist": ["github:*", "linear:list_issues"]
}Gemini CLI: .gemini/settings.json
{
"tools": {
"allowed": ["run_shell_command(git)", "run_shell_command(npm test)"]
}
}GitHub Copilot CLI: allow everything except rm and git push
copilot --allow-all-tools --deny-tool='shell(rm)' --deny-tool='shell(git push)'
OpenCode: opencode.json (last matching rule wins)
{
"permission": {
"bash": {
"*": "ask",
"git *": "allow",
"npm *": "allow",
"rm *": "deny"
}
}
}Kiro: ~/.kiro/settings/permissions.yaml
rules:
- capability: shell
match: ["git *", "npm *", "npx *"]
effect: allowSandboxes: auto-approve with a safety net
- Codex pairs an approval policy with a sandbox: read-only, workspace-write or danger-full-access. codex --sandbox workspace-write --ask-for-approval on-request lets it edit the workspace and asks before leaving it. Network access is off by default in workspace-write.
- Cursor's Auto-review mode runs allowlisted calls immediately and sends other shell commands to the sandbox when possible.
- Junie's --sandbox flag lets you use brave mode with less risk; it is only in development, nightly and experimental builds and not on Windows.
- Claude Code's own guidance is to use --dangerously-skip-permissions only inside a container or VM, as a non-root user.
Which rule wins when allow and deny overlap
- Claude Code: deny first, then ask, then allow.
- GitHub Copilot CLI: --deny-tool always beats the allow options.
- Kiro: deny beats ask, and ask beats allow, across every scope.
- OpenCode: the last matching rule wins, so put the catch-all first and specific patterns after it.
- goose: environment variables override config.yaml, which overrides defaults.
Step-by-step guides per tool
- Cursor: Run Everything, allowlist and sandbox
- Claude Code: permission modes, allow rules and skip permissions
- Claude Code: allow, ask and deny rule syntax
- Codex CLI: approval modes and --yolo
- Codex CLI: sandbox modes and network access
- Gemini CLI: YOLO mode and allowed shell commands
- GitHub Copilot CLI: --allow-tool, --deny-tool and --allow-all-tools
- Cline: Auto Approve and YOLO Mode
- goose: GOOSE_MODE permission modes
- OpenCode: allow, ask or deny permissions
- Kiro: permissions.yaml rules
- Junie: brave mode and action allowlist
- Zed: tool_permissions for the terminal
- Factory Droid: autonomy levels and droid exec
Get Claude Code settings changes by email
When a setting, flag or permission rule in this guide changes, it goes in the weekly AgentAtlas update, checked against the vendor docs. One email a week.
Sources
More on Claude Code
More Claude Code guides
- How to allow Claude Code to run all commands: permission modes, allow rules and skip permissions
- Claude Code permissions: allow, ask and deny rules, rule syntax and allowed tools
- Claude Code telemetry and data retention: what is sent and how to turn it off
- CLAUDE.md: where it goes, how it loads, and how it works with AGENTS.md
- Claude Code hooks: format on save, block risky edits, get notified
- Claude Code subagents: create one, limit its tools, and call it
- Add MCP servers to Claude Code (claude mcp add, .mcp.json, scopes)
- Claude Code custom slash commands and skills (SKILL.md)
- Claude Code settings.json: file locations, precedence, and key settings
- Claude Code plugins and marketplaces: install, create, and share
- Claude Code headless mode: claude -p, --output-format json, --bare and CI flags
- Claude Code statusline: custom status bar in settings.json with context %, cost and git branch
- Claude Code /model: switch models, aliases (opus, sonnet, haiku, opusplan), ANTHROPIC_MODEL and effort
- Claude Code /cost and /usage: check token spend, usage limits and reduce costs
- Claude Code VS Code extension: install, shortcuts, settings and /ide (works in Cursor too)
- MCP 2026-07-28 Migration Guide: Stateless Protocol, No Sessions, server/discover, MRTR, and SDK v2 Upgrade
- Subagents and Custom Agents Compared: Claude Code vs Codex vs Cursor vs Gemini CLI vs GitHub Copilot (2026)
- How to deploy a remote MCP server (Streamable HTTP): Cloudflare Workers, Vercel, Railway and more (2026)
- Claude Code sandbox: /sandbox, sandbox.enabled, allowedDomains, excludedCommands and strict mode
Other guides
Reviewed Oct 18, 2026. Settings change often; the linked vendor docs are the source of truth.