Background Agent: Pull Requests From the Cloud While You Work on Something Else
The newest Cursor surface runs in the cloud, not your editor. It clones your repo, does the work remotely, and opens a pull request when done. This changes the fundamental shape of how you work. Here is how it operates.
Every Cursor surface so far runs locally and ties up your editor while it works. Background Agent breaks that constraint. It runs on Cursor's cloud infrastructure, which means you can fire off multiple tasks in parallel and keep working in your IDE while they execute. A heavy user might have three to five background agents running at once, each handling a different migration, refactor or feature.
How It Works Step by Step
When you trigger Background Agent, Cursor clones your repository to a cloud worker using your GitHub authentication, spins up a containerised environment with your dependencies installed, runs the agent task with full access to the codebase and terminal, iterates autonomously until the task is complete, opens a pull request with the changes, and notifies you when the PR is ready for review. From your perspective, you describe a task and later receive a pull request, with everything in between handled remotely.
|
Cursor AI: The Complete Guide Want the full Background Agent setup and cost guide? 41 pages covering all four AI surfaces, Background Agent, model selection, MCP and Skills integration, pricing strategy, 20 pro tips and a complete 30-day mastery plan. Get the Complete Guide → |
The Clone-and-Work Pattern
Background Agent uses strong isolation from your local development. It does not have access to your local environment, your secrets file, or your work-in-progress changes. It works only with what is in the repository on the branch you specify. This isolation is a feature: it means the agent cannot accidentally interfere with your local work, and its changes are cleanly contained in a branch and pull request.
The practical implication: commit your in-flight work before launching Background Agent on the same files, otherwise the agent operates on stale code. The standard pattern is to commit current changes, branch off if needed, then trigger the agent on the branch you want it to work in.
Pull Requests From the Cloud
When the agent finishes, it opens a pull request in your repository (GitHub now, with GitLab and Bitbucket rolling out). The PR includes a summary of what the agent did, the full diff, test output showing what passed, any blockers it encountered, and a link back to the run for inspection. You review it like any other PR: comment, request changes, or merge. Background Agent can even respond to PR comments and make additional changes, much like a human collaborator.
The Workflow Shift
The most powerful Background Agent pattern is end-of-day batching. Fire off several tasks as you wrap up: a dependency upgrade, a test coverage improvement, a refactor you have been putting off. Wake up to pull requests ready for review. The work happened overnight, in parallel, without occupying any of your active hours.
Managing Costs
Background Agent runs on metered credits at a higher rate than local surfaces because it uses cloud infrastructure. A typical task costs $0.50 to $3.00 in credits, with complex multi-hour tasks reaching $10. The Pro tier includes some usage; Pro+ triples the pool; Ultra is designed for users running multiple background agents continuously. Monitor consumption in Settings and match your tier to your actual usage.
|
Ready to master the AI-native IDE? Cursor AI: The Complete Guide covers everything: the four AI surfaces (Tab, Chat, Composer, Agent Mode), Background Agent cloud workflows, model selection across Claude, GPT, Gemini and Grok, MCP and Skills integration, the complete pricing breakdown, 20 power-user tips, 12 common pitfalls, and a 30-day mastery plan that takes you from install to fluent power user. Get the Complete Guide →Instant PDF download · 41 pages · Current as of 2026 |