Background Agents are Cursor's most advanced feature. They run autonomously in the cloud, handling complex tasks while you continue working — or even while you're away from the computer.
You can run up to 8 background agents simultaneously, each working on different tasks. Use Git worktrees to give each agent its own branch and working directory, preventing conflicts.
// Typical background agent workflow: // 1. Assign a GitHub issue to the agent // 2. Agent clones repo, creates branch // 3. Writes code, installs deps, runs tests // 4. Opens PR when all tests pass // 5. You review and merge