Limited offer

What Is the Best Runtime for Cursor Background Agents? Local Mac vs Cloud Mac Tested

AI Engineering Cursor Cloud Agents · Cloud Mac
2026-06-17 ~13 min read

Bottom line: Cursor Cloud Agents (formerly Background Agents) default to Cursor-hosted Linux VMs—fine for pure Web/backend work. Once your Agent needs Xcode, Simulator, Keychain, or macOS-only toolchains, you need a lid-never-closes macOS runtime—a dedicated Cloud Mac is built for that.

This is not a Cloud Agent install guide. It answers—with hands-on testing"should Background Agent run on local Mac or Cloud Mac?" comparing Cursor-hosted VM, local machine, and dedicated Cloud Mac, plus SSH + tmux + worktree architecture and a 48-hour acceptance runbook.

Key takeaways

  1. Background Agent is about finishing tasks in the cloud while you close the lid—runtime matters more than model choice.
  2. Cursor's default Cloud Agent runs in a Linux VM + Dockerfile/snapshot and cannot natively run Xcode or the iOS Simulator.
  3. Apple platform teams should move Agent runtime to a dedicated Cloud Mac: repo, MCP, and build chain on one machine, one path namespace.
  4. Recommended architecture: local Cursor as remote control → SSH into Cloud Mac → tmux persistent sessions → worktree parallelism.
  5. Start with a 48-hour daily lease to validate RTT, parallelism, and lid-close recovery—then lock a monthly baseline.
Developer running Cursor Cloud Agent with parallel worktree tasks on a remote Mac
Background Agent value is in finishing the job—not keeping your laptop open. macOS tasks need a macOS runtime.

1. What Background Agent changed: from chat to long-running tasks

From late 2025 through 2026, Cursor renamed Background Agents to Cloud Agents (official docs still cross-reference the old name). The positioning is clear: move multi-hour coding tasks off your laptop into isolated cloud VMs, delivered as PRs, screenshots, logs, or remote-desktop replays. Trigger from Cursor Desktop Cloud mode, cursor.com/agents, Slack/GitHub/Linear @Cursor, or the API—see Cloud Agents docs and Background Agents help.

This is nothing like "ask the IDE for a completion." Typical Background Agent work: cross-directory refactors, batch lint fixes, test backfill, dependency upgrades, feature implementation from issues—minutes to hours, requiring repo clone, dependency install, shell execution, MCP calls, self-test, then PR. Cursor stresses that without a proper dev environment, Agents underperform—environment config is priority one, frozen via .cursor/environment.json, Dockerfile, or snapshot.

kvmboot support tickets show the same shift: from "how do I enable Background Agent?" to "my Agent must run xcodebuild / Simulator—Cursor's Linux VM isn't enough; should I rent a Cloud Mac?" Yesterday's Hermes Agent Skills install checklist answers what capabilities to install; this article answers which machine should run the Agent—same decision chain as MCP Server placement and why Claude Code moves to Cloud Mac, but Cursor Background Agent adds an official hosted VM option that must be understood first.

2. Where Cursor's official Cloud Agent runs: Linux VM, not Mac

By default, Cursor Cloud Agent runs in a Cursor-hosted isolated Linux VM: clone from GitHub/GitLab, edit on a branch, run commands, attach team MCP servers, execute shell-based Hooks from .cursor/hooks.json in the cloud, then push and open a PR. Your laptop can close—Agent keeps running. That is the design promise.

For pure Web, Node, Python, Go, Rust (Linux targets) teams, this fits well: Dockerfile or snapshot for reproducibility, Secrets in Cursor Dashboard, Artifacts (screenshots/video/logs) on the PR for review. Cursor also supports remote desktop takeover of the Agent VM to click through web changes—great for frontend tasks.

Hard boundary: default Cloud Agent VMs are Linux, not macOS. No native Xcode, iOS Simulator, codesign, Apple Keychain, or macOS-only CLIs. Hooks docs note that hooks depending on the local IDE or user-level ~/.cursor/hooks.json do not run in the cloud VM—the VM cannot see your laptop home directory. If the task says "pass iOS build" or "Archive and upload TestFlight," the default environment fails at the toolchain layer, not because the model is dumb.

Plain conclusion: Cursor Cloud Agent excels at Linux-closed-loop tasks; Apple platform delivery needs a separate macOS runtime—usually a dedicated Cloud Mac.

3. Why Apple teams need a macOS runtime (L1: problem breakdown)

Treat Background Agent as a "coding CI worker" and the choice becomes obvious. Four task classes Linux Cloud VMs often cannot handle—but Cloud Mac on the same machine can:

3.1 Xcode and Simulator: Agent must stand on macOS

Agent plans often include "edit Swift → compile → run Simulator → screenshot for acceptance." In a Linux VM, Agents can edit source at best—they cannot self-verify UI or the signing chain. Post-WWDC 2026 many teams target iOS 27 beta (see macOS beta and CI isolation); a Background Agent on Linux cannot even verify "does this compile against beta SDK?"—you manually move work to a Mac, erasing most async advantage.

3.2 Paths, worktrees, and MCP: Agents bind to absolute paths

Like Claude Code, Cloud Agent tool calls bind to absolute paths on the current machine. If Cursor MCP points to a local stdio server while the repo clones in Cursor's Linux VM, paths split. Put repo + MCP + Hooks working directory on one Cloud Mac so Agent (Cursor Remote SSH or CLI sidecar) sees one filesystem. Parallel worktree layout: remote Mac worktree short lease.

3.3 Lid-close and 24/7: local Mac as runtime is the old trap

Some teams run "Cursor Cloud Agent for Linux + local Mac for iOS"—if iOS still binds to a laptop, lid-close, sleep, and VPN flaps kill long-running Agents. Background Agent promises you can walk away; a local Mac as iOS runtime breaks that unless it never closes—exactly what Cloud Mac hosting sells.

3.4 Team reuse: Secrets and baseline environments

Cursor Dashboard Secrets cover official Cloud VMs, not your internal Git mirror, Apple developer certificates, or corporate CA. On a dedicated Cloud Mac, teams inject Keychain, proxy, .env templates, and Homebrew baselines; members SSH in—the "environment snapshot" for Background Agent is yours, not dependent on Cursor snapshots including macOS toolchains.

4. Four things Cloud Mac solves for Background Agent (L2: classification)

In kvmboot terms, "Cloud Mac" means a dedicated Mac mini M4 bare-metal instance: fixed user home, SSH/VNC, daily/weekly/monthly lease. For Cursor Background Agent workflows it delivers four capabilities:

  • Native macOS runtime: Xcode, Simulator, xcodebuild archive, codesign on the same machine as the Agent—tasks close the loop.
  • 24/7 always-on: with tmux / screen, SSH disconnect or local lid-close does not kill cloud sessions; nightly Agents and cron can add launchd (see launchd + Agent FAQ).
  • Worktree farm: multiple Background-level tasks each get an isolated worktree, avoiding parallel Agents fighting over .git/index; aligns with Cursor multi-Agent parallelism but you control directory boundaries.
  • MCP and Hooks co-located: Cursor MCP, Claude Code MCP, or custom servers share repo paths—fewer cross-machine tools/call failures.

Division of labor: Cursor official Cloud Agent still fits one-click dispatch and PR-from-cursor.com Linux tasks; Cloud Mac fits macOS closed-loop, internal dependencies, certificate-sensitive work, or full control of environment snapshots. Most teams run both lines in parallel, not either/or.

5. Recommended architecture: SSH + tmux + worktree (L3 deployment)

We do not recommend treating Cloud Mac as "open Cursor GUI in remote desktop and leave it running"—expensive and unstable. A steadier stack:

  1. Local: Cursor Desktop or browser—dispatch tasks, review PRs, light edits;
  2. SSH: connect to dedicated Cloud Mac, tmux new -s bg1 for a persistent session;
  3. worktree: per Background task git worktree add ../task-foo feature/foo in its own directory;
  4. Agent execution: Cursor Remote SSH into the worktree, or CLI Agent (Claude Code / Codex) for long runs; Linux-compatible subtasks still go to official Cursor Cloud Agent;
  5. Acceptance: macOS builds/Simulator on Cloud Mac; web tasks via Cursor PR Artifacts.
┌─────────────────────────────────────────┐
│ 本地:Cursor Desktop / 手机 PWA          │
│  · 派 Cloud Agent(Linux 任务)           │
│  · SSH Remote → 云 Mac(macOS 任务)      │
└──────────────────┬──────────────────────┘
                   │ SSH + tmux
                   ▼
┌─────────────────────────────────────────┐
│ 云 Mac mini M4(独占)                    │
│  · worktree-1 … worktree-N              │
│  · Xcode / Simulator / 签名               │
│  · MCP Server(与仓库同路径)              │
│  · 可选:launchd 夜间 Agent              │
└──────────────────┬──────────────────────┘
                   ▼
         Git remote · 模型 API · Cursor Cloud VM(并行)

Key point: the "background" machine must be the one that never closes its lid. Cursor's official VM handles Linux; Cloud Mac handles macOS—do not let iOS tasks drift back to your laptop.

6. Three-runtime comparison table

Runtime Entry Execution Context Cost Permission boundary Best for
Cursor hosted Cloud VM IDE Cloud mode / Web / Slack / GitHub Linux build, test, PR; remote desktop GitHub clone; Dashboard Secrets Cursor subscription + model API usage Cursor sandbox; no local home Web/backend; one-click PR teams
Local Mac laptop Local Cursor Agent Full macOS toolchain Local paths, local Keychain Hardware depreciation + power Fully local; hard to share Short personal tasks; accept lid-close interrupts
Dedicated Cloud Mac SSH Remote / CLI Agent / optional GUI Full macOS chain + 24/7 + worktree parallelism Team baseline; MCP co-located Daily/weekly/monthly M4 lease Tenant-exclusive; self-managed keys iOS/macOS delivery; multi-Agent parallelism

Asymmetric conclusion: Cursor Cloud Agent is the "lowest-friction Linux Background Agent"; Cloud Mac is the Apple-platform Background Agent runtime—stack them, do not substitute.

7. Scenario matrix: which option (L4 decision)

Your task Recommended runtime Why
Whole-repo TypeScript lint + unit tests + PR Cursor Cloud VM Linux closes the loop; official Artifacts suffice
Flutter/iOS UI change + Simulator screenshots Dedicated Cloud Mac Requires macOS + Simulator
Overnight dependency upgrades + multi-repo linkage Cloud VM or Cloud Mac VM if no Xcode; Mac if macOS submodules involved
Internal Git + corporate CA + Apple certificates Dedicated Cloud Mac Self-controlled Secrets and Keychain
Personal weekend tweak, lid-close OK Local Mac Lowest cost; accept interruption

8. Recommended combos and red lines

Combo A (mixed team): frontend/backend Background tasks default to Cursor Cloud Agent; mobile group runs worktree + Remote SSH on the same org Cloud Mac, MCP pointing at Cloud Mac local paths. PRs still flow through GitHub with unified review.

Combo B (indie iOS): one 16GB Cloud Mac daily lease—IDE Remote by day, CLI Agent or launchd for nightly regression; occasional Linux chores via Cloud Agent without a second machine.

Red lines: ① never test "24/7 Background Agent" on a closing laptop; ② never configure MCP with local paths while repo lives on Cloud Mac; ③ never run 4 worktrees + Simulator + Docker on 16GB (memory governance: Cloud Mac memory spikes); ④ never keep Archive/signing local while Background coding runs on Linux—manual handoff is guaranteed.

9. Common misconceptions

  • Myth 1: "Cloud Agent means no Cloud Mac"—only true if the entire task closes on Linux; iOS/macOS involvement requires a Mac runtime.
  • Myth 2: "Remote SSH to Cloud Mac = Background Agent"—Remote is just transport; you need tmux/worktree, parallel tasks, and lid-close continuity for a Background workflow.
  • Myth 3: "Snapshots/Dockerfile replace macOS"—Cursor environment targets Linux VMs; xcodebuild cannot be "simulated" in Linux containers.
  • Myth 4: "Duplicates Claude Code on Cloud Mac"—Claude Code article covers CLI host; this article covers Cursor Background/Cloud Agent vs official VM boundaries; in practice they often co-deploy on one machine with different decision axes.

10. 48-hour acceptance checklist (Runbook)

  1. Daily lease APAC or US East Cloud Mac; measure SSH RTT and git pull feel (onboarding: rent Mac acceptance checklist).
  2. Clone main repo and create 2 worktrees; on Cloud Mac complete one "edit Swift/config → xcodebuild or flutter build ios → pass" cycle.
  3. Use Cursor Remote SSH on one worktree; dispatch a small 3+ file task; confirm Agent executes entirely on Cloud Mac paths.
  4. In parallel: on cursor.com dispatch official Cloud Agent on a pure frontend subdirectory; compare PR turnaround vs macOS task.
  5. Close laptop 8 hours; reconnect tmux and check Cloud Mac session plus incomplete Agent task state.
  6. If MCP needed: per MCP Server placement guide, start Server on Cloud Mac locally; verify tools/call path consistency.
  7. If satisfied, upgrade to weekly/monthly; multi-Agent parallelism often needs 24GB tier.

Top 3 failures: Cloud Agent editing iOS but building in Linux VM; worktree path mismatch with MCP --repository; daily lease machine running Archive without disk headroom (Derived Data governance in Runner disk articles).

11. FAQ

Q: Cursor already has Cloud Agent—why rent a Mac?

Because default Cloud Agent runs on a Linux VM. Tasks involving Xcode, Simulator, Apple signing, or macOS-only CLIs need a macOS runtime—Cloud Mac is the most common self-hosted option.

Q: Can I use only Cursor Cloud Agent and manually handle macOS?

Yes, but Background Agent's "async closed loop" degrades: Agent edits Swift on Linux, you still compile on a Mac. For frequent releases, manual catch-up exceeds one Cloud Mac monthly lease.

Q: Does this conflict with Claude Code / Codex dual-Agent architecture?

No. See Cloud Mac dual-Agent isolation: Cursor leans IDE + official Cloud Agent; CLI Agents lean scripted long runs—share the same Cloud Mac worktree farm with directory isolation.

Q: Is Background Agent secure?

Cursor official VMs have sandboxing and Secrets management (Cloud Agent security). Dedicated Cloud Mac tenants control keys and egress; compliance teams can short-lease and destroy, or restrict Git mirrors and MCP egress.

Q: 16GB or 24GB?

Single worktree + light Simulator: 16GB daily lease is enough to validate; 2+ parallel Background tasks + multi-process MCP + Simulator farm: prefer 24GB monthly.

12. Conclusion

Cursor Background Agents (Cloud Agents) free long coding tasks from your laptop—but by default into a Linux VM. For Apple platform teams, what should move to the cloud is the macOS runtime: a lid-never-closes dedicated Cloud Mac with SSH + tmux + worktree, sharing one path for IDE Agent, CLI Agent, and MCP.

Suggested path: keep Linux chores on Cursor Cloud Agent → move macOS closed-loop to Cloud Mac → 48-hour daily lease acceptance → lock monthly. Models keep getting cheaper, but uninterrupted Background tasks price delivery cycles—Cloud Mac buys "Agent finished while you slept; PR and Simulator screenshots ready in the morning."

Run Cursor Background Agent on Cloud Mac (macOS tasks)

Dedicated M4 bare metal in APAC and US East. Built for worktree parallelism, Xcode closed-loop, and co-located MCP; 48-hour daily lease to validate Background workflow, then monthly.

Configure Cloud Mac plans · View M4 specs · Onboarding checklist