Cursor Worktrees: Isolated Agent Branches in Agents Window

Cursor

Cursor 3.2 delivers an improved worktrees experience directly within the Agents Window, allowing agents to execute isolated tasks in the background across separate Git branches. Users can push any running agent into a worktree to keep their local working tree clean, then pull a branch back into the foreground with a single click when they are ready to review or test changes. The integration brings worktree management fully into the agent-centric interface introduced in Cursor 3.


Worktrees Integrated into the Agents Window

Cursor 3.2 brings an improved worktrees experience to the Agents Window, deepening the integration between Git's branching model and Cursor's agent orchestration layer. Worktrees allow multiple branches of a repository to be checked out simultaneously in separate directories, and Cursor now surfaces this capability as a first-class, agentic workflow.

Background Execution Across Branches

With the updated worktrees integration, agents can run isolated tasks in the background on a dedicated branch without touching the main working tree. A developer can, for example, have one agent fixing a bug on a fix/login-flow branch in a worktree while continuing to actively develop on main in the foreground β€” no stashing, no branch switching, no interruptions.

One-Click Promotion to Foreground

When an agent finishes work in a worktree, users can promote that branch to the local foreground with a single click. This bridges the gap between background agent work and hands-on testing: once the agent completes its isolated task, the developer can immediately pull the result into their active working environment to review diffs, run tests, or continue editing.

Agentic Worktree Management

Cursor positions this as fully agentic β€” the agent itself manages the lifecycle of the worktree, from creation through task execution to branch readiness. Combined with the /worktree command (which creates isolated checkouts) and /best-of-n (which spawns multiple worktrees to compare model outputs), the 3.2 improvements make worktrees a core part of how Cursor's agent environment handles concurrent, conflict-free development.

Why It Matters

The worktrees improvement directly addresses one of the most common pain points in agentic development: agents interfering with live work. By keeping background agent runs in isolated branches, Cursor ensures that in-progress agent sessions never corrupt or conflict with the developer's active context. The one-click promotion mechanism then makes it trivial to integrate agent-produced changes back into the main workflow when they're ready.