Start local worktree agent from a specific branch

Feature request for product/service

Cursor IDE

Describe the request

Why can’t i pick the branch to start a worktree agent from? I can pick the branch when starting a cloud agent, but a local new worktree (parallel) agent seems to always create a new branch from the current one. Am I doing something wrong?

Operating System (if it applies)

MacOS

hi @Mikhail_Primakov the branch from which Worktrees are started is the current checked out branch.

On Cursor Web (Cloud) it is required to select a branch since there is none checked out.

it looks like i can start one, then checkout, then start another one
thank you!

1 Like

Yes worktrees are copies, it can also work this way.

This works, but is not ideal. I’d like to be able to do some dev and testing on my checked out branch while also having agents work on different branches in the background.

In this context being able to spin up a new agent and tell it which branch to branch from would help me stay in the flow. Otherwise, I have to stash what I’m working on, change to the base branch, start the agent, change back to my branch, apply my stashed changes and then keep on going.

Any chance Cursor would consider adding the option to specify the agent’s branch point when using the worktree workflow?

Here’s an example. I was just testing out some recent changes on my local branch. While staging the scenario to test I realized one of our database seeding scripts could be better. At that moment I wanted to start up an agent to begin adding a new option to the script.

That agent needs to base its changes off master not off the branch I’m testing. I could stash, switch, start, switch, apply. But it would be much more convenient to just tell the agent “do this and base off master; go”.

Also, I’d use cloud agents but our organization does not allow them.

Same here. A new worktree is for a new task, so when using trunk-based development, it will never be a fork from the current branch but always from master.