# New worktree does not use selected branch

**URL:** <https://forum.cursor.com/t/new-worktree-does-not-use-selected-branch/173470>\
**Category:** Feature Requests\
**Tags:** worktrees, agents-window\
**Created:** [October 1, 2026, 4:20am UTC](https://forum.cursor.com/t/new-worktree-does-not-use-selected-branch/173470 "2026-10-01T04:20:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Milind](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Milind](https://forum.cursor.com/u/Milind)\
**Post date:** [October 1, 2026, 4:20am UTC](https://forum.cursor.com/t/new-worktree-does-not-use-selected-branch/173470/1 "2026-10-01T04:20:58Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

When initiating a new agent, if i select new worktree option it always creates a new cursor branch with a random name, instead of using the branch that I selected. I have to checkout the branch separately.

### Steps to Reproduce

Create a new agent from agents window, select a branch, select new worktree option, send a message, note the branch that the chat is using

### Expected Behavior

The worktree should use the selected branch

### Screenshots / Screen Recordings

 ![Screenshot 2026-10-01 at 12.13.57 PM.png](https://us1.discourse-cdn.com/cursor1/original/3X/3/2/3226e0860061eac210992db2af334a8d953bc215.png) ![Screenshot 2026-10-01 at 12.19.54 PM.png](https://us1.discourse-cdn.com/cursor1/original/3X/8/3/83947ab67c95ab7d3397379d8605b4b07afe0fe9.png)

### Operating System

MacOS

### Version Information

Version: 3.22.12  
VS Code Extension API: 1.128.0  
Commit: 3a92974361033b2051526321308c2740fe5912c0  
Date: 2026-09-26T04:55:12.125Z  
Layout: Agent Window  
Build Type: Stable  
Release Track: Default  
Electron: 42.10.0  
Chromium: 148.0.7778.280  
Node.js: 24.18.1  
V8: 14.8.178.38-electron.0  
xterm.js: 6.1.0-beta.291  
OS: Darwin arm64 25.6.0

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [October 1, 2026, 9:55am UTC](https://forum.cursor.com/t/new-worktree-does-not-use-selected-branch/173470/6 "2026-10-01T09:55:17Z")

</div>

Hey @Milind,  
New Worktree uses the branch you pick as a starting point and puts the agent on its own new branch (that’s `cursor/23283375`). To have the agent work directly on `feat/sdk-add-callback-url`:

1. No isolation needed: pick This Mac instead of New Worktree and select your branch. Cursor will offer to check it out.
2. Isolation on your branch: run `git worktree add ../callback-url-worktree feat/sdk-add-callback-url`, then open that folder in Cursor and start the agent there. The branch can’t be checked out in your main folder at the same time.

You can also change the `cursor/` prefix under Settings \> Source Control \> Branch Prefix.

Using the selected branch directly in a new worktree is a fair request, so I’ve moved this to Feature Requests where others can vote on it.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [October 3, 2026, 9:56am UTC](https://forum.cursor.com/t/new-worktree-does-not-use-selected-branch/173470/7 "2026-10-03T09:56:02Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
