Parallel Agents, Cloud Agents, and Bugbot
Parallel Agents, Cloud Agents, and Bugbot
So far in this course, you've worked with one agent at a time in the editor's side panel. You give it a task, watch it work, and review the result. That covers most daily work, but Cursor can do more. You can run several agents side by side, send a task to an agent that works in the cloud while you do something else, and have an AI reviewer check every pull request.
These features can multiply what you get done. They also multiply the amount of code you need to review. This lesson covers how each one works, when to use it, and how to use it safely.
What You'll Learn
- What the Agents Window is and how it differs from the editor's side panel
- How to run agents in parallel using git worktrees and
/best-of-n - What Cloud Agents are, when to use them, and how to review the pull request they return
- How Bugbot reviews pull requests on GitHub
- What the Cursor CLI is for
- Safe-use habits for working with many agents at once
The Agents Window
The Agents Window is a separate view built around agents rather than files. Open it from the command palette (Cmd+Shift+P, then type "Agents Window"). The classic editor still exists, and you can have both open at the same time.
In the Agents Window, each agent runs in its own tab, and you can tile several agents side by side to watch them work. Each agent can run in a different place:
- Locally, in your current project folder
- In a git worktree, a separate copy of your project on its own branch
- In the cloud, on a remote machine managed by Cursor
- Over SSH, on a remote machine you control
A good way to think about it: the editor is where you write and read code, and the Agents Window is where you manage the agents doing work for you.
Why Run Agents in Parallel?
Many tasks don't depend on each other. While one agent adds input validation to your API, another could update the README, and a third could write tests for a utility module. Running them one after another wastes time. Running them in parallel lets you spend your time reviewing results instead of waiting.
Worktrees: Keeping Parallel Agents Apart
If two agents edit the same folder at the same time, they can overwrite each other's changes. Git worktrees solve this.
A worktree is a second (or third, or fourth) working copy of the same repository, checked out on its own branch in a separate folder. Each agent gets its own worktree, so each one has its own files and its own branch. When an agent finishes, you review its branch and merge it like any other.
In Cursor, you can start an agent in a worktree with the /worktree slash command, or choose a worktree as the agent's location in the Agents Window.
Example: Three Tasks at Once
Suppose you have three small, separate tasks:
- Add rate limiting to the
/api/loginroute - Convert
utils/date.jsto TypeScript - Add missing tests for
cartTotal()
Start three agents, each in its own worktree, each with one task. While they work, you can keep coding in the editor. When they finish, you get three separate branches to review and merge one at a time. If one result is bad, you throw away that branch without touching the others.
/best-of-n: Same Task, Several Attempts
Sometimes you want options rather than separate tasks. The /best-of-n slash command runs the same task several times in parallel (for example, with different models), each in its own worktree. You then compare the results and keep the best one.
This is useful when:
- The task is tricky and the first attempt might not be the best
- You want to compare how different models approach a problem
- You're choosing between design approaches, such as two ways to structure a component
Keep in mind that every extra attempt uses more of your plan's usage. Save /best-of-n for tasks where the comparison is worth it.
Cloud Agents
Cloud Agents run on isolated virtual machines in the cloud instead of on your computer. You give one a task, it clones your repository, does the work, and returns a pull request. Cloud Agents can also use a computer and a browser inside their machine, so they can run your app, click through it, and attach screenshots, videos, and logs to show what they did.
Where to Start a Cloud Agent
You can start Cloud Agents from several places:
- The Agents Window in Cursor, by choosing the cloud as the agent's location
- The web, at cursor.com/agents
- Slack, by asking Cursor in a channel or thread
- Cursor's mobile apps
You can also hand off work you started locally. The /in-cloud command moves a local conversation to a Cloud Agent so it keeps going after you close your laptop. Work can move back from the cloud to your machine too.
When to Use Cloud Agents
Cloud Agents are a good fit for:
- Well-defined tasks with a clear finish line, such as "fix this bug" or "add a test for this edge case"
- Longer tasks you don't want to watch, like a dependency upgrade across many files
- Work you start away from your desk, such as kicking off a fix from your phone or from a Slack thread
- Tasks that need to show their work, where screenshots or videos of the running app help you judge the result
They are a weaker fit for exploratory work, unclear requirements, or design decisions. For those, stay in the editor, use Plan mode, and keep yourself in the loop.
Reviewing the Pull Request a Cloud Agent Returns
A Cloud Agent's pull request deserves the same review as one from a teammate, and often more. Before you merge:
- Read the description and the full diff. Check that it did what you asked and nothing more.
- Look at the evidence. Screenshots, videos, and logs help, but they show what the agent chose to show. Run the branch yourself for anything important.
- Check that tests run and pass in CI. Be suspicious of tests that were deleted, skipped, or weakened.
- Watch for scope creep. Unrelated refactors or new dependencies should be removed or split into another PR.
- Ask for changes if needed. You can reply to the agent with follow-up instructions instead of fixing everything by hand.
Never merge an agent's pull request just because the checks are green.
Bugbot: AI Review on Every Pull Request
Bugbot is Cursor's pull request reviewer. Once it's connected to your GitHub repositories, it reviews pull requests and leaves comments that point out likely bugs, such as a missing null check, an off-by-one error, or a security issue. Reviews come back quickly, so you can fix problems before a human reviewer even looks.
Bugbot can also suggest fixes (Autofix), and it can learn rules about your codebase over time so its comments fit your conventions. Setup and settings can change, so check Cursor's docs for how to connect it to your repositories.
How Bugbot Fits Your Workflow
Bugbot works well alongside the other tools in this course:
- You write code in the editor, or an agent writes it for you
- You open a pull request
- Bugbot reviews it and flags issues
- You (or an agent) fix the issues
- A human reviewer does the final review and merges
Bugbot reviews pull requests from Cloud Agents too, which gives you a second automated check on agent-written code. It does not replace human review. Treat its comments the way you'd treat any reviewer's: some will be important, some will be wrong, and you decide which to act on.
The Cursor CLI
Cursor also has a command-line interface. The agent command runs the same agent from your terminal, with the same slash commands. (Older guides call it cursor-agent, which still works as an alias.)
The CLI is handy when:
- You prefer working in the terminal
- You're logged into a remote server over SSH and don't want to open an editor
- You want to run an agent from a script
Everything in this lesson still applies: give it clear tasks, and review its changes before you commit them.
Safe-Use Guidance
More agents means more code to review and more ways for things to go wrong. These habits keep parallel and cloud work safe.
Review Everything
Every line an agent writes is code you are responsible for. Read every diff and every pull request before merging. If you can't keep up with reviews, you're running too many agents.
Keep Tasks Small and Scoped
Agents do best with one clear task and a clear finish line. "Add input validation to the signup form and add a test for it" works better than "improve the signup flow." Small tasks produce small diffs, and small diffs are easier to review. Scoped tasks also stop parallel agents from editing the same files.
Keep Secrets Out
Never paste API keys, passwords, or customer data into a prompt, a Slack message to an agent, or a task description. Cloud Agents work on a copy of your repository on a remote machine, so make sure secrets are not committed to the repository. If an agent needs credentials to run your app, use the proper secret settings for your team rather than putting them in the prompt.
Protect Your Main Branch
Let agents work on branches and open pull requests. Don't let any agent push straight to your main branch, and keep human review as a required step before merging.
Watch Your Usage
Parallel agents, /best-of-n, and long cloud tasks all use your plan's usage faster than a single chat. Check your usage in Cursor's settings or dashboard, and save parallel runs for work where they actually save you time.
Choosing the Right Tool
| Situation | Best fit |
|---|---|
| A focused task you want to watch and steer | Agent in the editor side panel |
| Several separate tasks at once | Agents Window with one worktree per task |
| A tricky task where you want options | /best-of-n |
| A well-defined task you don't need to watch | Cloud Agent |
| Catching bugs before human review | Bugbot on your pull requests |
| Agent work from a terminal or server | Cursor CLI |
Summary
The Agents Window lets you run many agents at once, each in its own tab and, with worktrees, on its own branch. /best-of-n runs the same task several times so you can pick the best result. Cloud Agents take well-defined tasks off your machine and return a pull request with evidence of what they did. Bugbot reviews pull requests on GitHub and flags likely bugs before a human reviewer sees them. The Cursor CLI brings the same agent to your terminal.
These tools let you get more done, but only if your review keeps pace. Keep tasks small, keep secrets out, and never merge code you haven't read.
Key Takeaways
- The Agents Window (Cmd+Shift+P, then "Agents Window") runs many agents in parallel, locally, in worktrees, in the cloud, or over SSH, alongside the classic editor
- Git worktrees give each parallel agent its own copy of the project and its own branch, so agents don't overwrite each other
/best-of-nruns the same task several times so you can compare results and keep the best, at the cost of extra usage- Cloud Agents run on isolated cloud machines and return pull requests, often with screenshots, videos, and logs; start them from the Agents Window, the web, Slack, or mobile
- Review a Cloud Agent's PR like a teammate's: read the full diff, check the evidence, run the tests, and watch for scope creep
- Bugbot reviews pull requests on GitHub and flags likely bugs, but it complements human review rather than replacing it
- The Cursor CLI (
agent) runs the same agent from your terminal - Stay safe: review everything, keep tasks small and scoped, keep secrets out of prompts and repositories, and protect your main branch

