Pillar guide
Cursor Agents: Agent Mode, Plan Mode and Background Agents
Cursor's agent can edit across files, run commands and check its work. Current Cursor agent workflows also include cloud subagents with /in-cloud, local loops with /loop, automations with /automate and Bugbot review with /review. You get better results by scoping the task, keeping context clean and reviewing the diff.
On this page
What is Cursor Agent mode?
Agent modeCursor's full-capability mode: the AI can read the codebase, write and edit files, move them and run terminal commands. Contrast with Ask mode, which is read-only. Press Enter for the full definition. lets Cursor act on your codebase: it reads relevant files, proposes and applies multi-file edits, runs terminal commands (tests, installs) and iterates until the task is done, pausing for you to approve changes. It is the core of how serious work gets done in Cursor.
I would keep approvals on for longer than feels necessary, and not because the model cannot be trusted. Approvals are what keep the diff small enough that you actually read it. Turn them all off on day one and the first thing you review is an hour of work.
Everything else on this page is a variation on that loop, which is worth holding onto as the surfaces multiply. Plan Mode moves the reading earlier, onto a plan instead of a diff. Cloud runs move it later, onto a branch you read after the fact. Agent Review runs a second pass over the same diff, and /automate schedules the whole thing and hands you a pull request.
This is covered hands-on in Cloud Agents and Parallel Work — 6 short modules, free to read.
How does Plan Mode help?
For anything non-trivial, ask the agent to produce a plan before it edits. Plan Mode turns a vague task into an explicit, reviewable list of steps and files, so you catch a wrong approach in seconds instead of unwinding a bad multi-file change.
The most useful habit with any coding agent: separate thinking from doing. Review the plan, correct it, then let the agent run. It dramatically cuts wasted edits.
Plan Mode helps because the agent farms context aggressively up front. One security engineer who started skeptical became a complete convert: he now defaults to Plan for anything net-new or non-trivial, because in plan the agent finds all the relevant injection points ahead of time. That does two things: it forms context more comprehensively than it would by default, and it keeps the agent on track during execution. For genuinely quick changes he skips it.
If we're going to build anything net new or make changes to anything that's relatively involved, then I use plan because it will go and find ahead of time all of the injection points.
Run Plan with a high-reasoning model (GPT-5.x or Opus 4.x); a verbose, even voice-dictated prompt is fine because Plan Mode's job is to interpret the messy explanation into a clear, distinct plan and ask clarifying questions to fill the gaps. The plan it returns shows what the model learned, the proposed design, files to add and a to-do list. Read the to-dos and prune the extras. One presenter removed "build and verify" and "dual check" steps because verification was manual, telling it to just code up the bot. You can edit the plan conversationally in the same chat, and you can preempt it to add downstream needs. Switch to a faster execution model once the plan is right.
Review the to-dos to see if it has too many extra steps, then say something like: "please remove the build and verify as well as dual check to-dos because we'll be manually verifying."
Planning everything is its own mistake, though. Cursor puts Plan Mode on work where the approach is not obvious, and the Plan Mode page says as much: a change you have made a dozen times can go straight to Agent. A plan for a one-line copy fix costs a round trip, a read and a decision you did not need to make. If you could hand the change to another engineer in one sentence and expect it back correct, skip the plan.
What are cloud, background and parallel agents?
Current Cursor can run longer work in cloud environments, launch /in-cloud subagents in their own VM and branch and use /babysit to keep iterating on a PR remotely. Treat each cloud run as a self-contained task with clear acceptance criteria so the diff is easy to verify.
- Give each background task a single, well-scoped goal and a way to verify it (a test, a command).
- Don't run parallel agents on overlapping files: you'll get conflicting edits.
- Review each result independently before merging.
The rule everyone quotes from that list is the middle one, keep parallel agents off overlapping files. It is the right instinct and slightly the wrong rule, because file overlap is the easy case and rarely the thing that bites. Two agents can work in entirely separate files and still both reshape the callers of a shared function, or both write a migration. The check that holds up is whether each diff would make sense to a reviewer on its own. If reading one needs the other in your head, run them in sequence.
Wasted tokens are the cheap part of a background run going wrong. What costs you is finding out late, on a branch, with a diff big enough that reading it properly competes with having just done the task yourself. That is the argument for acceptance criteria. A run that can fail its own check tells you near the start instead of at the end.
On a team of three, keeping parallel agents out of each other's way is something you can hold in your head, because you know what everyone is working on. On thirty it is not, and the coordination has to live somewhere. Worktrees give each run an isolated checkout, which is the version of this that needs the least agreement from anybody.
When should I use /loop, /automate or /review?
These three commands cover different points on the path from one-off prompt to standing automation. /loop repeats a prompt locally until you stop it, /automate turns a proven workflow into something that runs on a trigger, and /review runs BugbotCursor's automated PR reviewer that posts inline findings and can push fix commits from isolated VMs. Press Enter for the full definition. or Security Review over your changes.
- Command or surface
- /loop
- Use it for
- A local long-running prompt that repeats until an outcome is reached or you stop it.
- Review habit
- Keep the task local and inspect each repeated result.
- Command or surface
- /automate
- Use it for
- Turning a proven workflow into an always-on automation with Slack, GitHub, schedule or webhook triggers.
- Review habit
- Define no-op behavior, tools, memory and PR expectations before widening scope.
- Command or surface
- /review
- Use it for
- Running BugbotCursor's automated PR reviewer that posts inline findings and can push fix commits from isolated VMs. Press Enter for the full definition. or Security Review before push, with
/review-bugbotand/review-securityavailable for direct runs. - Review habit
- Treat findings as review evidence; humans still own merge decisions.
| Command or surface | Use it for | Review habit |
|---|---|---|
| /loop | A local long-running prompt that repeats until an outcome is reached or you stop it. | Keep the task local and inspect each repeated result. |
| /automate | Turning a proven workflow into an always-on automation with Slack, GitHub, schedule or webhook triggers. | Define no-op behavior, tools, memory and PR expectations before widening scope. |
| /review | Running BugbotCursor's automated PR reviewer that posts inline findings and can push fix commits from isolated VMs. Press Enter for the full definition. or Security Review before push, with /review-bugbot and /review-security available for direct runs. | Treat findings as review evidence; humans still own merge decisions. |
Prove a workflow by hand in a local session first, then /loop it while you watch, then /automate it once the output stops surprising you. That order is the useful part of the table. Skipping to the automation is tempting, probably because the trigger list is the interesting bit, and it means the first real test of your prompt happens on a schedule, in a shared repo, in front of the team.
The 'define no-op behavior' line in that last column is the one to read twice. Triggers include a Slack emoji reaction and a review thread being marked resolved, which puts your automation inside activity other people generate all day without thinking about it. The pull-request tool is enabled by default on every automation, so a repo-backed one can open a pull request off a run you never meant to start, without you having turned anything on. Cursor's docs ask you to set a quality bar for when the agent should open a pull request, comment or do nothing, and the cost of skipping that lands on whoever reviews pull requests rather than on you.
/review is where I would start, since it runs before the push and costs almost nothing to try. Local findings are evidence, and nothing about them moves a merge button. When you want the gate rather than the evidence, that lives with BugbotCursor's automated PR reviewer that posts inline findings and can push fix commits from isolated VMs. Press Enter for the full definition. on the pull request, and Agent Review covers where the local pass fits around it.
In what order should I adopt these?
Start with Agent modeCursor's full-capability mode: the AI can read the codebase, write and edit files, move them and run terminal commands. Contrast with Ask mode, which is read-only. Press Enter for the full definition. and approvals on, add Plan Mode for anything you cannot state in a sentence, then run /review before you push. Cloud runs and /automate come after that, once you have a workflow that already works while you are watching it.
Each step in that sequence is what makes the next one readable, which is a different criterion from difficulty. Plan Mode gives you something to read before a diff exists. Local review gives you a second opinion on the diff. A cloud run is only safe to leave alone because you already know what a good result for this task looks like. Run it backwards and you get the familiar version of this failure, a fleet of background agents producing work nobody has a standard for.
When a run goes sideways, the first thing worth checking is whether the agent had any way to know it was finished. A task with a test attached can fail. A task described only in prose ends when the model decides it has said enough, which is why the same prompt can come back at three different scopes on three runs.
How do I prompt the agent for reliable results?
Reliable runs come from telling the agent what you want, where to look and how to know it worked.
- 1State the goal and the constraint ("add X without changing the public API").
- 2Point at the exact files with @-mentions instead of making it search.
- 3Ask for a plan on anything that spans more than a couple of files.
- 4Tell it how to verify (run these tests / this command).
- 5Start a fresh chat when context gets long (see context hygiene).
Step four is the one that gets skipped. It feels like extra typing at the exact moment you want to hit send, and it is the only one of the five that changes what happens when the agent is wrong, because a run with a check can fail and a run without one can only stop.
@-mentioning everything is the part I would soften. Pointing at the two files that matter beats a blind search. Pointing at eleven fills the context with code the model has to read past, and from the outside that looks identical to a bad prompt. If you are not sure which files matter, that is a Plan Mode task rather than a longer @ list.
In this guide
How side chats work in Cursor: three ways to open one, what context the child conversation inherits, current limits and the workflow patterns they enable.
Open guideHow to share a Cursor conversation as a read-only link, team vs public visibility, what the secret redaction does and doesn't catch, and the plan gating.
Open guideAgentic coding means directing an agent toward a goal instead of typing every line. How the loop works in Cursor, and where Plan mode and Cloud Agents fit.
Open guideAI pair programming puts you and an agent on the same task. How the loop runs in Cursor, from Cmd+I to the pull request, and what you still own.
Open guideGenerated commit messages, Resolve in Chat for merge conflicts, the Made with Cursor trailer and Cursor Blame. What Cursor adds on top of Source Control.
Open guideAdd an MCP server to Cursor so the agent can use external tools and context - config, stdio vs remote and how to fix the common 'no tools found' problem.
Open guideThe prompting habits that make Cursor's agent reliable: state the goal and constraints, point at the right files, ask for a plan and define how to verify.
Open guideHow Cursor Agent combines instructions, tools and models: codebase search, terminal, browser, edits and when to open it with Cmd+I.
Open guideWhen to use the Agents Window vs the classic editor: parallel cloud agents, diffs, worktrees, /in-cloud subagents and enterprise rollout controls.
Open guideUse Agent Debug Mode when guesses fail: hypothesize, instrument, reproduce, analyze logs, fix and remove instrumentation.
Open guideSelect elements in a running app, prompt against live UI, multi-select related components and let Agent edit the underlying code.
Open guideRun Agent Review automatically after commits, on demand with /agent-review, or on full local diffs vs main; Quick vs Deep depth and .cursor/BUGBOT.md rules.
Open guidePlan Mode makes Cursor research your codebase and write a reviewable plan before it edits. Press Shift+Tab to switch, edit the plan, then build.
Open guideCursor's Browser tool lets the agent navigate, click, type, screenshot, and read console and network logs to test and debug your app in a real browser.
Open guideHow Cursor's agent runs shell commands: Run Mode decides when commands run or ask, the sandbox restricts file and network access.
Open guideCursor canvases render an agent's dashboards, analyses and reports as interactive artifacts you can reopen, edit, share and rerun with fresh data.
Open guideConfigure a cloud agent environment: repos, dependencies, secrets and network so the agent can run and test code like a developer.
Open guideWhat a Cursor cloud agent can do: an isolated desktop VM, screenshot and video artifacts on the PR, MCP tools, and automatic CI fixes.
Open guideCursor Automations run cloud agents on a schedule or in response to GitHub, GitLab, Slack, webhook, Linear, Sentry and PagerDuty events.
Open guideCursor's recommendations for reliable cloud agent runs: configure the environment, grant access, use skills and AGENTS.md, and give the agent good tools.
Open guidePick where Cloud Agents run: Cursor-managed VMs, My Machines, or a Self-Hosted Pool. The agent loop always runs in Cursor's cloud.
Open guideHow Cursor Cloud Agents protect secrets, sign commits, retain data, and control outbound network access with three egress modes and allowlists.
Open guideEvery Cloud Agent dashboard setting explained: environments, secrets your agents can actually read, network access modes, and the team toggles admins miss.
Open guideEvery field in .cursor/environment.json, verified against Cursor's published schema: install, start, terminals, ports, snapshot, build and more.
Open guideOne cloud agent environment can span several repos. Set up a repo group, wire environment-scoped secrets and run tasks that open PRs in every repo.
Open guideCursor Security Agents scan code for vulnerabilities: a Security Reviewer on pull requests and a Vulnerability Scanner on a schedule, both on Cloud Agents.
Open guideCursor Approval Agents approve pull requests when your criteria are met or assign reviewers when they are not, using policy files, risk scores, and Bugbot.
Open guideCursor's Microsoft Teams integration lets you start and manage Cloud Agents by mentioning @Cursor in a chat or channel, with repo, branch, and model options.
Open guideCursor Agent Skills let you package domain knowledge and workflows into reusable /commands the agent can invoke automatically or on demand.
Open guideHow the Cursor SDK runs the agent from TypeScript or Python, what local and cloud runtimes actually mean, how runs are billed, and what shipped recently.
Open guideFrequently asked questions
Why does the Cursor agent get stuck in a loop?
Usually it can't verify success (no test/command to check against), the context is too noisy or the task is under-specified. Give it a concrete success check and a tighter scope and start a fresh chat if context has grown large.
Can Cursor work on a large codebase?
Yes. It indexes your repo and retrieves relevant files. For best results, scope tasks to specific areas with @-mentions rather than asking for repo-wide changes in one shot.
Should I let the agent run commands automatically?
For trusted, low-risk commands it speeds things up. For anything that touches data, deploys or external systems, keep approvals on and review before running.
Sources & last verified
- Cursor Docs - Agent overview
- Cursor Docs - Agents Window
- Cursor Docs - Agent Review
- Cursor - Changelog
- Cursor Changelog - Cloud Environment Setup and Cloud Subagents
- Cursor Changelog - Improvements to Cursor Automations
- Cursor Changelog - Bugbot June 2026 update
Cursor ships frequently. Last updated July 28, 2026.
Keep reading
Rather do it than read about it? Run 11 interactive Cursor walkthroughs in a simulated editor. Free, no account needed.