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: allow

Sandboxes: 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

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

Other guides

How to allow Cursor to run all commands: Run Everything, allowlist and sandboxCodex CLI: approval and sandbox modesGemini CLI: YOLO mode, auto_edit and allowing specific shell commandsCursor Privacy Mode: telemetry, training and data retentionGemini CLI: turn off usage statistics and telemetryAdd MCP servers to Cursor with mcp.json: Keep files out of Cursor with .cursorignore: Configure Codex with config.toml: Configure Gemini CLI with settings.json: GitHub Copilot custom instructions: Adding MCP servers to GitHub Copilot: Gemini CLI extensions and custom commands: Configuring OpenCode with opencode.json: Cline Rules: workspace, global, and conditional rulesKiro steering files: .kiro/steering, inclusion modes, and AGENTS.mdZed agent: instruction files, MCP servers, tool permissions, and ACP agentsCursor CLI: install, headless mode, permissions and CIAider: CONVENTIONS.md, .aider.conf.yml and API keysJunie guidelines, MCP and the Action Allowlist: Amp AGENTS.md, settings.json and MCP: Configure Goose extensions, hints, recipes and permissions: Customize OpenHands with skills, AGENTS.md, setup.sh and MCP: Configure Factory Droid CLI: AGENTS.md, settings.json, autonomy, custom droids and MCPConfigure Qwen Code: settings.json, providers, QWEN.md, MCP and approval modesCursor hooks: hooks.json, beforeShellExecution, afterFileEdit and exit codesCursor sandbox: sandbox.json, network allowlist and run modesCursor settings: settings.json, Cursor Settings and the ~/.cursor config filesCursor browser agent: @browser, browser automation and approval modesCursor subagents: .cursor/agents, frontmatter, built-in Explore and BrowserCursor telemetry and OpenTelemetry export (Privacy Mode, OTLP, Analytics API): Cursor rules setup: project, user and Team Rules, .mdc frontmatter, globs and AGENTS.mdCodex AGENTS.md: global, project and override instruction files explainedCodex MCP servers: codex mcp add and [mcp_servers] in config.tomlCodex sandbox modes: read-only, workspace-write, danger-full-access and network accesscodex exec: run Codex non-interactively in scripts and CI with JSON outputCodex skills: create SKILL.md, skill folder locations and $skill invocationGEMINI.md in Gemini CLI: context file locations, imports and /memoryGemini CLI MCP servers: gemini mcp add and mcpServers in settings.jsonGemini CLI custom slash commands: TOML files, {{args}}, !{shell} and @{file}Gemini CLI headless mode: gemini -p, JSON output and exit codes for scripts and CIGemini CLI sandbox: enable Docker, Podman, macOS Seatbelt or gVisorcopilot-setup-steps.yml: set up the GitHub Copilot cloudGitHub Copilot CLI permissions: --allow-tool, --deny-tool, --allow-all-tools and trusted directoriesGitHub Copilot custom agents: .github/agents/*.agent.md profiles, tools and frontmatterGitHub Copilot code review settings: automatic PR reviews, rulesets, effort level and approvalsOpenCode MCP Server Setup: Local and Remote Servers in opencode.jsonOpenCode Permissions: Allow, Ask or Deny Bash, Edit and WebfetchOpenCode Custom Agents and Subagents: Markdown Files, Modes and @ MentionsCline MCP Setup: cline_mcp_settings.json for Local and Remote ServersCline Auto Approve and YOLO Mode: Run Commands and Edits Without PromptsCline Skills: SKILL.md Location, Format and Slash Command UseAmp MCP Setup: amp mcp add, amp.mcpServers and Workspace ApprovalAmp AGENTS.md: File Locations, @ Mentions and Glob-Scoped GuidanceAmp Skills: SKILL.md Folders, amp skill add and Search OrderKiro MCP Setup: .kiro/settings/mcp.json, autoApprove and OAuthKiro Hooks: .kiro/hooks JSON, PreToolUse, PostFileSave and StopKiro Permissions: permissions.yaml Allow, Ask and Deny RulesFactory Droid MCP Setup: droid mcp add, mcp.json Locations and /mcpFactory Droid Hooks: hooks.json, PreToolUse Matchers and Exit CodesFactory Droid Custom Droids (Subagents): .factory/droids Markdown FilesJunie MCP Setup: .junie/mcp/mcp.json for CLI and /mcp CommandJunie Brave Mode and Action Allowlist: Auto-Approve Commands in Junie CLIJunie Custom Slash Commands: .junie/commands Markdown Files and Argumentsgoose .goosehints and AGENTS.md: Global and Project Instructionsgoose Permission Modes: GOOSE_MODE auto, approve, smart_approve and chatgoose Recipes: recipe.yaml Format, Parameters and goose run --recipeZed Agent Tool Permissions: Auto-Approve Terminal Commands with tool_permissionsUse Claude, Codex and Gemini CLI in Zed: External Agents and agent_serversZed with Ollama, LM Studio and llama.cpp: Local Model Setup and Context LengthAdd an MCP server to any AI coding agent: Claude Code, Cursor, Codex, Gemini CLI, VS Code and 8 moreSettings file locations for every AI coding agent: Claude Code, Cursor, Codex, Gemini CLI, OpenCode, Qwen Code, Amp and Factory DroidRules and instruction files in every AI coding agent: .cursor/rules, CLAUDE.md, AGENTS.md, GEMINI.md, Copilot instructions and moreGemini CLI hooks: settings.json, BeforeTool, AfterTool, exit codes and /hooksGitHub Copilot hooks: .github/hooks/*.json for Copilot CLI and the cloud agentHooks in every AI coding agent: Claude Code, Cursor, Gemini CLI, GitHub Copilot, Kiro and Factory DroidAgent Skills (SKILL.md) in every AI coding agent: Claude Code, Codex, Cline, Amp and OpenHandsHeadless mode in every AI coding agent: claude -p, codex exec, gemini -p, Cursor agent -p and copilot -p for scripts and CISandbox modes in every AI coding agent: Claude Code, Cursor, Codex and Gemini CLI compared

Reviewed Oct 18, 2026. Settings change often; the linked vendor docs are the source of truth.