AI Learning Hub › Learn AI › Self-Paced Courses › Cursor: Plan, Build, Debug, and Review › Build It with Agent
Module 5 ยท Beginner to intermediate
Build It with Agent
Find out what the agent may do before you let it work. Then watch it build the feature, and notice when the file on disk changed.
By the end
- Find the setting that decides what the agent may do without asking you
- Say which actions run automatically and which stop for approval
- Build the feature, and know when the file on disk changed
You are about to let a program write to your files. Two minutes spent finding out what it may do first makes the rest of the course easier to follow, and the controls are all in one place.
Find the boundary
Open Cursor’s settings and go to Agents. Scroll to the section headed Execution and Approvals.
The first control is Run Mode, which governs how the agent runs tools such as shell commands and connected services.
Allowlist
Only the commands you have listed run on their own. Everything else stops and asks. Predictable, and talkative until the list fits your work.
Allowlist (with Sandbox)
The same, with supported commands running in a restricted environment that limits what they can reach.
Auto-Review (with Sandbox)
A classifier reviews calls the sandbox cannot take and decides whether to run them. Fewer interruptions, with a check in front of riskier commands.
Run Everything (Unsandboxed)
Every tool call runs immediately, with no sandbox and no review. Worth knowing by name so you recognize it; leave it alone while you are learning.
Cursor describes Auto-Review candidly in its own documentation, under the heading “Auto-review is not a security boundary”: the classifier “can make mistakes. It can allow a call you would have blocked, or block a call you would have allowed.” It reduces interruptions and it is a guardrail rather than a guarantee.
Two more controls sit below. Read Access decides whether the agent may read files outside the project folder without asking; the default setting lets it. Auto-Run Network Access governs what sandboxed commands can reach on the network.
The separate protections
Further down the same section are switches that can require approval even when the Run Mode would otherwise allow something.
File-Deletion Protection is the one to look at before you start. If it is off and a deletion command appears in your allowlist, files can be removed without a prompt. External-File Protection keeps the agent inside the project folder. MCP Tools Protection covers connected outside services, which this course does not use.
A Computer Use area on the same page lists applications Cursor may control without asking each time. It starts empty, so Cursor asks the first time, and that is worth knowing because it reaches past the project entirely.
Exercise. Write down four things before continuing: your Run Mode, your Read Access setting, whether File-Deletion Protection is on, and whether External-File Protection is on. Change nothing. The point is to know the boundary, not to tune it.
What happens without asking
With default settings, the agent reads any file in the project and searches the codebase freely, and it edits project files freely as part of doing the work. Terminal commands, connected services and browser actions stop for approval, subject to your Run Mode. Configuration files need approval before they are edited.
That first group deserves emphasis, because it surprises people:
The agent writes its code edits straight to your files. Run Mode governs tool calls such as shell commands; writing the code it was asked to write is the work itself, and it lands on disk as the agent goes. Reviewing comes afterward, which is what the next module is for.
This was measured for the course. On Cursor 3.27.12, under Allowlist (with Sandbox) — one of the more restrictive modes — a one-line edit reached disk seven seconds after the request, and no approval prompt appeared at any point.
Exercise: build the plan
Go back to your plan from Module 4 and press Build.
Watch the chat while it works. You will see it read files, report what it is doing, and show the edits it makes as small inline diffs. If a terminal command comes up, read the command before approving it — Terminal on Mac covers how.
When it finishes, before opening any review interface, run this in a terminal:
git diff --statYour files are already changed. That is the ordering the next module is built around.
If you ran out of free usage
Copy the finished files from the fallback/02-feature-complete folder in the practice download over the ones in your project. That puts you in the same place the exercise would have, and the next module works the same way.
Before the next module
- You know your Run Mode and your two file protections without looking them up
- The feature is built and
git diff --statlists changed files - You noticed that the files changed before you reviewed anything