
Cursor's agent doesn't ask before it edits files in your workspace. The Agent Security docs say it...
Cursor's agent doesn't ask before it edits files in your workspace. The Agent Security docs say it plainly: agents can modify workspace files without approval (configuration files are the exception), changes save to disk immediately, and you should use version control so you can revert. Terminal commands are different. By default they need your approval.
Most people want that prompt gone after a day. What replaces it is a run mode and three small files: .cursor/permissions.json, .cursor/sandbox.json and .cursorignore. The detail most often missed: a terminal allowlist entry of git doesn't mean "safe git commands". It means every command that starts with git.
An earlier article covered which jobs to give Cursor. This one covers what its local agent may do without asking. Everything below is from the official Cursor docs, fetched on 21 Nov 2026.
git status, not git..cursorignore, but don't treat it as a wall./agent-review or Source Control.Run modes live in Settings > Agents > Approvals & Execution (Run Modes docs). There are three:
Keep two lines from the docs in mind: run modes are "best-effort guardrails rather than a hard security boundary", and the classifier "can make mistakes" in both directions. Run modes also apply to local agents only. Cloud Agents run on their own dedicated machine and never ask you to approve an action.
The terminal allowlist can live in the settings UI or in permissions.json, either ~/.cursor/permissions.json (all projects) or <repo>/.cursor/permissions.json (one project). The permissions.json reference defines the matching: entries are command prefixes, case-sensitive. git matches git status, but it also matches git push --force and git reset --hard. npm matches npm publish.
In Auto-review that matters more than it looks: per the docs, allowlisted calls run immediately and outside the sandbox, so they skip the sandbox and the classifier. Separate protections can still force a prompt, such as File-Deletion Protection (it covers rm) and External-File Protection (files outside the workspace), but neither one covers git push.
A narrower list looks like this:
{
"terminalAllowlist": ["git status", "git diff", "git log", "npm test", "ls"],
"mcpAllowlist": ["github:get_issue", "linear:list_issues"],
"autoRun": {
"allow_instructions": [],
"block_instructions": [
"Any git push, git reset or git rebase should go through approval first.",
"Any command that publishes a package should go through approval first."
]
}
}
Three details from the reference:
server:tool. github:* approves every tool on that server and *:* approves every tool on every server. Name the tools you've actually read.autoRun instructions are plain English for the Auto-review classifier. The docs call them steering, not enforcement, and they do nothing in Allowlist or Run Everything mode.That last point has a consequence the docs don't spell out: a repo you clone can bring its own .cursor/permissions.json, and its entries join yours. Read that file before you run the agent in someone else's repo, the same way you'd read a stray AGENTS.md.
.cursorignore hides files from the agent, not from the shellPer the ignore file docs, files in .cursorignore are blocked from the Agent, Tab and @ mentions. The same page says the agent's terminal and MCP tools can't block access to them, and that protection "isn't guaranteed due to LLM unpredictability".
Covered by default: your .gitignore plus a built-in list that includes .env*. Not covered: .pem, .key and credentials.json, and the global ignore list in user settings starts empty. The docs suggest **/.env, **/.env.*, **/credentials.json, **/secrets.json, **/*.key, **/*.pem and **/id_rsa. The syntax is the same as .gitignore, and the docs suggest testing patterns with git check-ignore -v.
For a boundary outside the project, Cursor 3.23 added Read Access. Set it to Workspace and the agent has to ask before reading files outside the workspace, unless they're on your Read Allowlist. The default is System, which reads without asking.
The sandbox runs supported terminal commands with read and write access inside the workspace and network access blocked by default, then opened by your network mode and sandbox.json (sandbox.json reference). The default network mode adds Cursor's built-in list of package-manager and tool domains to yours.
"networkPolicy": {"default": "deny", "allow": [...]} limits sandboxed commands to the listed domains. Deny rules always beat allow rules.10.x, 192.168.x, 127.x and the cloud metadata endpoint are blocked by default..cursor/*.json and .cursorignore are write-protected inside the sandbox, so a sandboxed command can't loosen them.To check these in one go, I wrote cursor_guard_check.py (about 100 lines, Python standard library plus git). It reads a repo's .cursor/permissions.json, .cursor/sandbox.json and ignore files, then flags bare command prefixes, server:* MCP entries, an open network policy, and files that look like secrets but aren't ignored. It reads files only: it can't see your Cursor Settings, team policies or ~/.cursor, and the list of risky prefixes is my choice, not Cursor's.
I ran it on 21 Nov 2026 against a demo repo I made up for this, with a loose config "copied from a blog post" ("git", "npm", "github:*", network allow) and fake key files. Real output:
WARN terminalAllowlist "git" is a bare prefix; it also matches: git push --force, git reset --hard
WARN terminalAllowlist "npm" is a bare prefix; it also matches: npm publish, npm install <anything>
WARN mcpAllowlist "github:*" auto-approves every tool from github
INFO no autoRun.block_instructions (only matters in Auto-review mode)
INFO this repo ships its own permissions.json; its entries are added to yours
WARN sandbox.json networkPolicy.default is "allow" (any host)
INFO readBoundary is "system": the agent can read outside the workspace without asking
WARN config/credentials.json looks like a secret and is not in .cursorignore
WARN config/deploy.pem looks like a secret and is not in .cursorignore
INFO .cursorignore does not stop terminal commands or MCP tools from reading files
Result: 6 warning(s), 4 note(s)
After switching to the permissions.json above, a deny-by-default sandbox.json with readBoundary: "workspace", and a three-line .cursorignore, the same run printed Result: 0 warning(s), 2 note(s). The two remaining notes are the ones no config file fixes.
The summary says what the agent meant to do; the diff shows what it did. Agent Review runs a code review on your local changes: type /agent-review in the agent input, or run it from the Source Control tab to compare all local changes against your main branch. It has a Quick depth (fast, low cost) and a Deep one (slow, higher cost) for security-sensitive code or big refactors. You can also set it to run automatically; from Cursor 3.11 that setting is under Git & PRs > Pull Requests.
git, npm, curl, bash) with exact commands.server:* and *:*..cursor/permissions.json in any repo you didn't write..cursorignore or the global ignore list./agent-review before you merge.If you're new to Cursor, the free Cursor AI Quick-Start Cheat Sheet puts the AI surfaces, the essential keyboard shortcuts, the @ symbols for context and a 60-second starter workflow on 5 pages you can keep beside your editor.
When you want to go further, Cursor AI Mastery: The Complete Guide is a 41-page guide covering Agent Mode, Background (now Cloud) Agent workflows, model selection, MCP and Skills, rules, 12 common pitfalls with fixes, 20 power-user tips and a 30-day mastery plan.
This article was written with the assistance of AI and reviewed by the author. Cursor behaviour is from the official Cursor docs (Agent Security, Run Modes, permissions.json, sandbox.json, ignore file and Agent Review pages), fetched on 21 Nov 2026. The script output is a real run on 21 Nov 2026 against an invented demo repo; Cursor itself was not run for this article. PromptMaster guides are independent and not affiliated with or endorsed by Cursor.
aiA Cursor user working over Remote-SSH into a Linux GCP VM had their SSH connection drop and...
cursorCursor forgets your architecture, your decisions and yesterday's task every time you open a new chat. Rules files help, but they only hold what you write by hand. Here is how to give Cursor a real memory that it reads and writes itself, shared with every other AI you use.
mcpDisclosure: we build Clawifi, one of the options below, at ReARC Labs. Every limit in this post...
cursorYou installed a skill, opened Agent chat in Cursor, and it is nowhere to be found. Or worse, it shows...
aiA developer had built up a project over 61 completed Cursor Cloud Agent tasks, the most recent of...
mermaidMaintainer disclosure: I maintain Archify (tt-a1i/archify, Apache-2.0). This comparison covers real...
Workflows from the Neura Market marketplace related to this Cursor resource