Skip to content
AgentAtlas

How to allow Cursor to run all commands: Run Everything, allowlist and sandbox

How do I let Cursor's agent run commands without asking?

Open Settings > Agents > Approvals & Execution and pick a Run Mode. Run Everything runs every tool call automatically with no sandbox or review; Allowlist runs only the commands you list; Auto-review runs allowlisted calls immediately and sends other shell commands to the sandbox when possible.

Also in: 简体中文 · 日本語 · 한국어 · Español · Português (Brasil)

Compare: allow all commands in every AI coding agent →

The three run modes

  • Auto-review: allowlisted calls run immediately; other shell commands run in the sandbox when possible.
  • Allowlist: actions in your allowlist run without approval; with sandboxing enabled, supported shell commands can run in the sandbox.
  • Run Everything: every tool call runs automatically, with no sandbox or classifier review.

Steer Auto-review with permissions.json

Auto-review reads plain-English instructions from ~/.cursor/permissions.json (global) or .cursor/permissions.json in the project, in an autoRun object with allow_instructions and block_instructions arrays. autoRun only applies in Auto-review mode.

.cursor/permissions.json

{
  "autoRun": {
    "allow_instructions": ["Running the test suite and the linter is always fine."],
    "block_instructions": ["Every AWS CLI command should go through approval first."]
  }
}

Before you pick Run Everything

Run Everything removes the sandbox, so the agent can reach the network and anything your user account can. Prefer Allowlist or Auto-review on your own machine, and keep Run Everything for disposable environments.

Cursor CLI: allow all commands with --force (--yolo)

The Cursor CLI (agent) has its own permission system, separate from the editor's Run Mode and allowlists. Pass -f or --force to allow commands unless a deny rule blocks them; --yolo is an alias for --force. In print mode (-p), the agent has access to all tools, including write and shell, so use permissions.allow, permissions.deny and --force to decide what runs without a prompt.

  • Rules live in ~/.cursor/cli-config.json (global) or <project>/.cursor/cli.json (one project), in a permissions object with allow and deny lists.
  • Shell(commandBase) matches shell commands by their first token. Globs work, and command:args matches the arguments too, as in Shell(curl:*).
  • Read(pathOrGlob) and Write(pathOrGlob) control file access, WebFetch(domain) controls which domains the agent can fetch, and Mcp(server:tool) controls MCP tools, with * wildcards.
  • Deny rules take precedence over allow rules, so a deny entry still blocks a command under --force.
  • --approve-mcps approves all MCP servers automatically. --trust trusts the workspace without a prompt (headless mode only). --sandbox enabled or --sandbox disabled sets the sandbox mode for the run.
  • Cursor's docs warn against broad wildcards such as WebFetch(*) and Mcp(*:*).

.cursor/cli.json

{
  "permissions": {
    "allow": ["Shell(git)", "Shell(npm)", "Write(src/**)"],
    "deny": ["Shell(rm)", "Read(.env*)", "Write(**/.env*)"]
  }
}

shell

# Run headless and allow every command that is not denied
agent -p --force --trust "run the tests and fix any failures"

Cursor command allowlist in permissions.json (terminalAllowlist and mcpAllowlist)

Besides the list in Settings > Agents > Approvals & Execution, you can keep the allowlist in a file: ~/.cursor/permissions.json for all workspaces, or .cursor/permissions.json in the repo for one workspace. When both exist, Cursor concatenates their arrays, so commit the repo file and teammates get the same list. Cursor re-reads the files when they change, and JSONC comments are allowed.

  • terminalAllowlist: terminal commands that run without approval. Entries are command prefixes matched case-sensitively, so git matches git status but not gitk. A colon separates the base command from an argument glob, as in npm:install*.
  • mcpAllowlist: MCP tools written as server:tool, where server is the key from mcp.json. Matching is case-insensitive and * works in either part and inside names, so github:* allows every tool from the github server and linear:list_* allows the list tools. Entries without a colon are ignored.
  • Each key is independent: if a file defines a key, its merged list replaces the settings screen list for that key only. You can control MCP tools in the file and leave terminal commands in the settings screen.
  • A key with an empty array gives an empty allowlist, with no fallback to the settings screen. If no file exists or can be read, the settings screen list applies.
  • When a file controls a list, that part of the settings screen becomes read-only, shows the file's entries and hides the Add to allowlist option.
  • Team admin dashboard settings come first. If an admin controls Run Mode, neither the file nor the settings screen can add entries.
  • Unknown keys are ignored. Cursor calls these lists a convenience, not a security boundary. The Cursor CLI has its own permission system.

.cursor/permissions.json

{
  "terminalAllowlist": ["git", "npm:install*", "cargo"],
  "mcpAllowlist": ["github:*", "linear:list_issues"]
}

How Auto-review decides

  • Allowlisted shell, MCP and Fetch calls run immediately.
  • Other shell commands run in the sandbox when possible. Commands that need more access, such as full network, writes outside the workspace or privileged operations, skip the sandbox and go to an LLM classifier on Cursor's backend.
  • If a sandboxed command fails on a restriction, the agent can rerun it outside the sandbox, and the classifier reviews that rerun.
  • If the classifier blocks a call, the agent may try another approach, or Cursor shows you an approval prompt.
  • Cursor says Auto-review is not a security boundary. On Enterprise plans, model access controls can disable it, and members then fall back to Allowlist.

Protections that still ask for approval

These toggles in the same settings section can require approval even in a mode that would otherwise run a call automatically. If Cursor still stops for one kind of action, check them first.

  • Browser Protection: stops the agent from running Browser tools automatically.
  • File-Deletion Protection: stops automatic file deletion, including rm commands.
  • External-File Protection: stops automatic creating, changing or deleting of files outside the workspace.
  • Read access (Cursor 3.23 and later): System, the default, lets the agent read files outside the workspace without approval. Workspace asks for approval for outside reads unless the path is on the Read Allowlist. Read access does not apply in Run Everything.

Where Ask Every Time and Run in Sandbox went

Cursor 3.5 deprecated the Ask Every Time mode. To get the same behavior, pick Allowlist and leave the list empty. Run in Sandbox was merged into Allowlist with sandboxing turned on. Run Modes only apply to local agents: Cloud Agents run on their own machine and never ask for approval.

Sources

More Cursor guides

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

Built an MCP server? Get it listed everywhere →

Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →