Skip to content

Cloud Agents and Automations: Cursor's Factory Floor

Cursor cloud agents are the renamed background agents: each runs in its own isolated VM with a full desktop environment rather than on the developer’s laptop. Cursor Automations start those agents unattended, on a schedule or on events from GitHub, GitLab, Slack, webhooks, Linear, Sentry and PagerDuty, and a REST API plus status webhooks drive the same fleet from external systems (checked 2026-08-28 against cursor.com/docs/cloud-agent).

Cursor Automations Checked 2026-08-28

Your team’s Cursor usage has quietly outgrown the editor. Somebody runs the dependency audit by hand on Fridays, the Slack channel where bugs get reported is a graveyard nobody triages, and the docs went stale three releases ago because the PR that changed the API never touched them. Each is a task with a clear trigger and a clear output.

  • A Slack-triggered triage agent that opens an investigating PR when someone posts a bug in a channel
  • A nightly dependency audit that reads the lockfile, checks advisories, and opens one PR for the safe bumps
  • A PR-merged docs-sync automation that wakes only when the diff touched a public surface
  • A working model of which of Cursor’s ten trigger families to reach for, and which fire far more often than their names suggest
  • The API and webhook contract for launching and observing runs from your own service

Cloud agents: same agent, different machine

Section titled “Cloud agents: same agent, different machine”

The definition is short and load-bearing: “Cloud agents use the same agent fundamentals but run in isolated VMs in the cloud with full development environments instead of on your local machine.” And, for anyone reading older material: “Cloud Agents were formerly called Background Agents.”

“Each cloud agent runs in its own isolated VM with a full desktop environment”, which buys behaviour a local agent cannot: the agent can “start dev servers, open the app in a browser, click through UI flows, and verify their changes work before pushing a PR”, and you “can take control of the agent’s remote desktop to interact with the software the agent is building.” Computer use, browser interaction, MCP tools, and automatic CI-failure fixing sit in the same capability list. Start one from the Cursor iOS app, cursor.com/agents, Cursor Desktop by selecting Cloud in the dropdown, Slack or a GitHub or Bitbucket comment with @cursor, Linear, or the API.

On cost: “Cloud Agents are charged at API pricing for the selected model. You can select the context window size, and a larger context window can increase token usage and costs.” That is the biggest lever on a fleet’s bill, and it is set per agent rather than per run.

“Builds prepare your Cloud Agent environment in the background. Each agent starts from a pre-built machine with your repositories, tools, and dependencies ready.” A Build is “a bootable snapshot of a prepared Cloud Agent environment”: it runs your install command to completion, clones repositories at their default branches, and preserves the resulting disk state.

The reason to care is latency multiplied by trigger frequency. “Cursor keeps pre-warmed copies of active Builds ready. This removes repository cloning and dependency installation from the agent startup path.” On a twice-daily schedule that is a nicety; on a Pull request pushed trigger in a busy monorepo it decides whether the review lands before the author context-switches.

Builds draw on inputs you may already have — .cursor/environment.json, Dockerfiles, install and startup commands, secrets, network settings. install runs during each Build; start and terminals run at agent start. Cursor “skips the Build when nothing changed since the last completed one”, recording those as Skipped.

Every event Cursor Automations can trigger on

Section titled “Every event Cursor Automations can trigger on”

“Cursor Automations run cloud agents in the background, either on a schedule or in response to events from GitHub, GitLab, Slack, webhooks, Linear, and more.” The “and more” does real work — the full documented list as of 2026-08-28:

FamilyDocumented triggers
ScheduledRecurring schedules, preset options or custom cron expressions
Source control (all providers)Draft opened · Pull request opened · Pull request pushed · Pull request merged · Push to branch · Comment added
GitHub onlyPull request label changed · Issue label changed · CI completed · Issue comment · PR review comment · PR review submitted · Review thread updated · Workflow run completed
GitLab onlyPull request label changed · Pull request approved
Bitbucket onlyPull request approved
SlackNew message in channel · Emoji reaction · Channel created
WebhookCustom HTTP endpoints for external systems
LinearIssue created · Status changed · End of cycle
SentryIssue created · Issue updated · Any issue event
PagerDutyIncident triggered · Incident acknowledged · Incident resolved · Any incident event

Two deserve a warning label. Emoji reaction is the most tempting trigger here and the easiest to fire by accident — one enthusiastic teammate reacting to a thread starts a cloud agent. And Sentry’s Any issue event fires on every update to every issue, not only new ones.

Building an automation: instructions, tools, repository scope

Section titled “Building an automation: instructions, tools, repository scope”

“Create a new automation in the Agents Window, at cursor.com/automations, with the /automate skill from a local agent session, or from a template in the Cursor Marketplace.” The /automate skill is the fastest path when you already know the shape.

  1. Pick the trigger. Narrow before you broaden; you can always add a second.

  2. Write the instructions. “Write a prompt with instructions for the automation.” It runs with nobody watching, so it must state its own stop conditions and refusals.

  3. Choose the tools. “Choose optional tools the agent is able to use, such as Send to Slack, Comment on Pull Request, or tools from MCP.” The tool list is the permission boundary — an automation without a Slack tool cannot message Slack, whatever the prompt says.

  4. Set repository scope, then save. Webhook-triggered automations only generate their URL and API key after the first save.

Outputs follow the tools you granted: “Repo-backed automations can open pull requests”, post comments on a target pull request, send messages to a Slack channel, or request reviewers.

Scheduled triggers take preset options or a custom cron expression — the family for work with no natural event: audits, drift checks, digests.

Source control is the highest-volume family, so the trigger matters more here than anywhere else. Pull request pushed fires on every force-push during a review; Pull request merged fires once, after the decision. For anything that should follow a merge rather than gate it, use the latter.

The entry titled “Cloud Agents and Cursor Harness Improvements” moved three things that matter for unattended work.

Event subscriptions. “Cursor can now monitor your PRs, watch a Slack thread, or run scheduled tasks.” The capabilities page explains the payoff: the agent can “wait for those events and keep working when they happen, without you re-prompting it”. That is the distinction between an automation, which starts a fresh run per event, and a subscription, which keeps one agent alive across events — which matters when the second event only makes sense in the context of the first, such as a CI failure on a PR the agent itself opened.

Subagents on their own machines. “Subagents can now run on their own virtual machines. Each gets an isolated copy of the project with clean context in its own cloud environment.” The subagents page frames it as a choice: “Each subagent gets its own environment with its own branch: an isolated Git worktree with a separate working directory on the same machine, or its own cloud environment with a dedicated VM and clone of the repository.” Definitions are Markdown with YAML frontmatter in .cursor/agents/ (or .claude/agents/ and .codex/agents/). Nesting is bounded: since Cursor 2.5 “subagents can launch child subagents… but a subagent launched by another subagent can’t launch further ones.”

A long-lived objective with /goal. The wording is “Use /goal to give the agent a long-lived objective to work towards until it’s fully complete”, with “fix all flaky tests and make CI green” as the example. The changelog’s summary line does say cloud agents can “hold a goal until it’s met”; the /goal entry itself reads “a long-lived objective to work towards until it’s fully complete” — quote the entry, not the summary.

Driving the fleet yourself: the Cloud Agents API

Section titled “Driving the fleet yourself: the Cloud Agents API”

“The Cloud Agents API lets you programmatically launch and manage cloud agents that work on your repositories.” Base URL https://api.cursor.com, with Basic and Bearer authentication using an API key from the Cursor Dashboard or a service-account key.

PurposeEndpoint
Create, list, get an agentPOST /v1/agents · GET /v1/agents · GET /v1/agents/{id}
Archive, unarchive, deletePOST /v1/agents/{id}/archive · POST /v1/agents/{id}/unarchive · DELETE /v1/agents/{id}
RunsPOST /v1/agents/{id}/runs · GET /v1/agents/{id}/runs · GET /v1/agents/{id}/runs/{runId}
Watch or stop a runGET /v1/agents/{id}/runs/{runId}/stream · POST /v1/agents/{id}/runs/{runId}/cancel
Usage and artifactsGET /v1/agents/{id}/usage · GET /v1/agents/{id}/artifacts · GET /v1/agents/{id}/artifacts/download
Scoped tokens and metadataPOST /v1/sub-tokens · GET /v1/me · GET /v1/models · GET /v1/repositories
Private workers and poolsGET /v0/private-workers · GET /v0/private-workers/pools · POST /v0/private-workers/claim

Creating an agent takes “the task prompt for the agent” — a prompt object with a required text field and optional images — plus a repos array of GitHub URLs and branch references. Agent and run are separate resources: POST /v1/agents creates the agent, POST /v1/agents/{id}/runs starts work, and GET .../stream follows it without polling. And POST /v1/sub-tokens exists to “create a one-hour user-scoped token for a worker to run as an active team member” from a service-account key — how a build system launches agents attributable to a person rather than a shared robot. Note the version skew: agents and runs are v1, private workers v0.

“When you create an agent with a webhook URL, Cursor will send HTTP POST requests to notify you about status changes.” The surface is deliberately narrow: “Currently, only statusChange events are supported, specifically when an agent encounters an ERROR or FINISHED state” (checked 2026-08-28). There is no progress stream over webhooks — use GET /v1/agents/{id}/runs/{runId}/stream.

The payload carries event, timestamp, id, status, source (repository, ref), target (url, branchName, prUrl), and summary, and “some fields are optional and will only be included when available” — so parse defensively rather than destructuring target.prUrl and hoping.

Verification is HMAC-SHA256 in the X-Webhook-Signature header, formatted sha256=<hex_digest>, computed over the raw request body before parsing. That ordering is what breaks integrations: a framework that JSON-parses and re-serialises before your handler runs produces different bytes and a signature that never matches. Webhooks “may be retried if your endpoint returns an error status code”, so make the handler idempotent.

The verification station: Bugbot, Security Agents, PR Routing and Approval

Section titled “The verification station: Bugbot, Security Agents, PR Routing and Approval”

Cursor ships three managed agents on the same surface: “The Automations page also includes three Cursor-managed agents: Bugbot reviews pull requests for bugs and code quality issues. Security Agents review pull requests and scan codebases for vulnerabilities.”

  • Bugbot “reviews pull requests and identifies bugs, security issues, and code quality problems”, analysing the diff and leaving “comments with explanations and fix suggestions” across GitHub, GitLab, Bitbucket, and Azure DevOps. Tune it with .cursor/BUGBOT.md: Bugbot “always includes the root .cursor/BUGBOT.md file and any additional files found while traversing upward from changed files”. Trigger a review by commenting cursor review or bugbot run. Watch the caps — each rule truncates at 30,000 characters, combined rules cap at 100,000, and past that “some rules may be omitted”, silently.
  • Security Agents “scan your code for security bugs, risky patterns, and vulnerabilities”, in two shapes: reviewers that examine pull requests before merging, and vulnerability scanners that scan codebases at rest on recurring schedules. They are configured through Automations, with custom instructions and MCP tools to route findings into Slack or an issue tracker.
  • PR Routing and Approval “routes pull requests to the right reviewers and can approve low-risk changes”, assigning reviewers from code ownership and commit history and weighing “risk scoring, approval policy files, AI review agent findings, and your configuration”. Its own docs draw the line: “It does not replace a full code review.” The page also states that “Security Agents require a team or enterprise plan.”

The station exists because the failure mode it guards against is measured. Faros AI’s AI Engineering Report 2026: The Acceleration Whiplash (April 2026), built on two years of telemetry from 22,000 developers and more than 4,000 teams, reports 31.3% more pull requests merging without any review.

What breaks when Cursor automations run unattended

Section titled “What breaks when Cursor automations run unattended”

Fork PRs do not trigger. “Pull request triggers don’t run on PRs opened from forks”, for security reasons. If your project takes outside contributions, your review automation covers exactly the PRs you trust most and none you trust least. Cover forks in CI instead.

Untrusted input plus memories. The docs flag it: memories “should be used with caution if your automation handles untrusted input.” Slack- and webhook-triggered automations ingest text written by someone who is not you, which is why the prompts above all open by naming that text as data.

No documented dry run. The automations page documents no test-fire or dry-run step before an automation goes live (checked 2026-08-28). Give a new automation a deliberately narrow trigger for its first days — one repository, one label, one channel.

Event storms. Pull request pushed, Comment added, Emoji reaction, and Sentry’s Any issue event fire far more often than their names suggest. Since cloud agents bill at API pricing for the selected model, an over-broad trigger is a bill, not just noise.

A stale Build. Agents failing on a dependency that landed yesterday usually means the snapshot predates it. Check the commit the Build recorded first.

A webhook that never verifies. If every signature check fails, the body was re-serialised before the check. Compute HMAC-SHA256 over the raw bytes.

A green run that changed nothing. An automation whose tool list lacks Comment on Pull Request or Send to Slack cannot report; it does the work and leaves no trace where you look. The tool list is the output surface, not just the permission boundary.

How Claude Code and Codex do the same thing

Section titled “How Claude Code and Codex do the same thing”

Claude Code’s equivalent is routines: a saved prompt plus repositories and connectors, with exactly three trigger types — Scheduled, API, and GitHub — running as cloud sessions where “there is no permission-mode picker and no approval prompts during a run”. Narrower than Cursor’s list, and with a documented one-hour minimum interval, but it will combine a schedule with an event trigger on one routine. Codex’s equivalent is scheduled tasks — “Schedule recurring tasks to run in the background” — firing on Gmail, Slack, and GitHub pull-request activity, with the explicit limitation that “one task can use multiple event triggers, but it can’t combine event triggers with a time-based schedule”. All checked 2026-08-28. Our walkthroughs: Claude Code routines and Codex automations.