By Priya Raman, NBT
Every coding agent has to answer the same question dozens of times an hour: may I run this command? Ask too often and you stop reading the prompts. Ask too rarely and one day it runs something you'd never have approved. Claude Code and Cursor (now called Grok Build) answer the question in quite different ways, and if you use both, it helps to know how to make them behave alike.
This article compares the two permission systems side by side, from each vendor's own docs, and ends with a matching setup you can copy. For the broader comparison of the two tools, see Claude Code vs Cursor.
The short version
| Claude Code | Grok Build (Agents Window) | |
|---|---|---|
| Main control | Permission modes plus allow / ask / deny rules | Run Modes plus allowlists |
| Modes | Manual (default), acceptEdits, plan, auto, dontAsk, bypassPermissions | Auto-review, Allowlist, Run Everything |
| Rules live in | settings.json files (user, project, local, managed) | permissions.json (~/.cursor/ and <project>/.cursor/), or the in-app allowlist |
| Rule style | Exact patterns, e.g. Bash(npm run *) | Allowlist entries, plus plain-English allow_instructions / block_instructions for the classifier |
| AI reviewer | auto mode: a background classifier checks actions | Auto-review: a classifier checks calls that aren't allowlisted or sandboxed |
| Where you set the mode | defaultMode in settings; /permissions to manage rules | Settings > Agents > Approvals & Execution |
Claude Code: modes, then rules
Claude Code's permission page describes a tiered default. In Manual mode, file reads and searches inside your working directories don't need approval; shell commands do, except a built-in set of read-only ones; file edits do; web fetches do, except a set of preapproved documentation domains.
The modes change who approves:
-
default(Manual) asks before most edits, shell commands and network requests. -
acceptEditsaccepts file edits and common filesystem commands (mkdir,touch,mv,cp) inside the working directory without asking. -
planreads and explores but doesn't edit your source files. -
autoskips routine prompts; a background classifier checks actions such as shell commands and network requests against your request. -
dontAskauto-denies anything that would prompt, while pre-approved tools still run. Useful for unattended runs. -
bypassPermissionsskips prompts. The docs say to use it only in isolated environments such as containers or VMs.
On top of the mode sit rules. They're written as patterns and evaluated in a fixed order: deny, then ask, then allow. The docs stress that the first match in that order wins and specificity doesn't change it, so a broad Bash(aws *) deny blocks aws s3 ls even if you allowed that exact command.
{ "permissions": { "allow": ["Bash(npm run *)", "Bash(git commit *)"], "deny": ["Bash(git push *)"] } } Two details worth knowing from the docs. The space before a trailing * matters: Bash(ls *) matches ls -la but not lsof, while Bash(ls*) matches both. And when you click "Yes, and don't ask again" on a shell command, the rule is saved to .claude/settings.local.json at the repository root, so it applies in later sessions too.
One more line from the docs that applies to every agent: permission rules are enforced by Claude Code, not by the model. Writing "never push" in CLAUDE.md shapes what Claude tries; only a rule, a mode or a hook stops it.
Grok Build: Run Modes, a sandbox and a classifier
Grok Build's Run Modes page describes three modes, set in Settings > Agents > Approvals & Execution:
- Auto-review: allowlisted calls run immediately; other shell commands run in a sandbox when they can; calls that can't use the sandbox go to a classifier. The docs call this "the safest useful setup for most people."
- Allowlist: only what's on your allowlist runs without approval. With sandboxing on, supported shell commands can run in the sandbox.
- Run Everything: every tool call runs automatically. No sandbox, no classifier.
The sandbox by default allows reading and writing inside the workspace, protects paths such as .git/config and .git/hooks, and blocks network access until your network settings or sandbox.json open it.
The classifier is steered in plain English. In permissions.json, autoRun.block_instructions holds sentences such as "Every AWS CLI command should go through approval first." The file can live in ~/.cursor/ (all projects) or <project>/.cursor/ (one project, and you can commit it); if both exist, Grok Build merges them. If your team defines an Auto-review configuration in the dashboard, it takes priority and the local files are ignored.
The docs include a clear warning: Auto-review is not a security boundary. The classifier can allow a call you'd have blocked, or block one you'd have allowed.
The real difference
Claude Code's rules are exact. Bash(git push *) in deny means a matching command doesn't run, whatever the model thinks. (The docs do note that a push written another way, such as git -C . push, isn't matched, so exact rules need care.)
Grok Build's instructions are judgement. A block_instructions sentence makes the classifier lean toward asking, and the docs say Grok Build can still ask you to approve a blocked action when the agent insists. Its exact controls are the allowlist (in Allowlist mode) and the sandbox.
Claude Code has a classifier too, in auto mode, and Grok Build has exact allowlists. So you can get similar behaviour from both. You just reach for different tools to do it.
A matching "careful but not annoying" setup
Goal: tests, builds and git reads run freely; pushes, deploys and cloud CLIs always ask.
Claude Code, in .claude/settings.json (committed, shared with the team):
{ "permissions": { "allow": ["Bash(npm run *)", "Bash(npm test *)", "Bash(git status *)", "Bash(git diff *)", "Bash(git log *)"], "ask": ["Bash(git push *)", "Bash(aws *)", "Bash(npm publish *)"] } } Grok Build, Auto-review mode, with <project>/.cursor/permissions.json:
{ "autoRun": { "allow_instructions": ["Running the project's npm test and build scripts is fine."], "block_instructions": [ "Every git push should go through approval first.", "Every AWS CLI command should go through approval first.", "Publishing packages should go through approval first." ] } } Then test both: ask each agent to run the tests (no prompt expected) and push a branch (prompt expected).
Using both from one place
Disclosure: we make Ninja Builder, a desktop app that runs Claude Code and Cursor's command-line agent, among others. In Cursor chats there, the chat's Autonomy setting picks Cursor's own mode (Plan first uses Cursor's plan mode; Just build it lets Cursor change files and run commands), and Cursor is never told to approve its add-on tools (MCP servers) by itself. In Claude chats, a Needs your OK card shows the exact command before a risky step runs.
Sources, checked 2026-12-06: Claude Code docs, "Configure permissions" (permission system, modes, rule order, wildcard patterns); Grok Build docs (docs.grok.com), "Run modes" (modes, auto-review, permissions.json autoRun, sandboxing). Product details from the Ninja Builder Guide.
