# Worktree agents fork automatically into separate workspaces

**URL:** <https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512>\
**Category:** Bug Reports\
**Tags:** worktrees, subagents\
**Created:** [February 21, 2026, 11:49am UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512 "2026-02-21T11:49:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [February 21, 2026, 11:49am UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/1 "2026-02-21T11:49:37Z")

</div>

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

Cursor IDE

### Describe the Bug

When using Worktree agents, the agent will sporadically launch a new workspace, switch to it, and continue the work there, and it can’t go back to edit the original workspace.

This can spiral out of control and end up with a session of work with 3, 4 worktrees; where putting everything together is a hassle.

### Steps to Reproduce

1.- Start a new worktree agent with some work.  
2.- After some time, ask the agent for the work it’s done.  
3.- It’ll tell you that some of the work is in a separate workspace that Cursor made it launch.

### Expected Behavior

Agents does all the work in just one worktree.

### Screenshots / Screen Recordings

 ![Screenshot 2026-02-21 at 14.47.20.png](https://us1.discourse-cdn.com/cursor1/original/3X/0/2/027fe3042873a4d15ffe93d366ac724f4560c3e3.png)

### Operating System

MacOS

### Version Information

Version: 2.5.17  
VSCode Version: 1.105.1  
Commit: 7b98dcb824ea96c9c62362a5e80dbf0d1aae4770  
Date: 2026-02-17T05:58:33.110Z  
Build Type: Stable  
Release Track: Default  
Electron: 39.3.0  
Chromium: 142.0.7444.265  
Node.js: 22.21.1  
V8: 14.2.231.22-electron.0  
OS: Darwin x64 24.6.0

### Does this stop you from using Cursor

Yes - Cursor is unusable

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [February 21, 2026, 11:50am UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/3 "2026-02-21T11:50:23Z")

</div>

Other report: [Agent stuck in "Planning...", "Generating..." - #21 by Vidar\_Halvorsen](https://forum.cursor.com/t/agent-stuck-in-planning-generating/151355/21)

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [February 21, 2026, 12:03pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/4 "2026-02-21T12:03:35Z")

</div>

It’s so messy that Cursor not even launched a new session to continue the work from the original worktree, but it grabbed an existing dangling commit, with some totally unrelated work in it, and continued doing the original worktree’s work there, mixing everything up.

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/3/0/30ca236efbdbc45616ee9f7a5c11e1a72c6c08e6.png)

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [February 21, 2026, 12:51pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/5 "2026-02-21T12:51:29Z")

</div>

Hey, thanks for the report. This is a known issue. Worktree agents sometimes unexpectedly create new workspaces or switch to unrelated branches or commits mid-session.

I can see both screenshots, including the one where the agent picked up an existing “dangling” commit from unrelated work and mixed everything together.

The team is aware of this class of worktree isolation bugs. Your report helps us prioritize it. I added a tag to the report, attached the screenshots, and linked your previous thread.

A couple of questions to help with debugging:

- Which model are you using when this happens?
- Do you start the worktree agent manually (via the dropdown), or does the agent decide to use worktree on its own?

Until this is fixed, if you need to keep working, running the agent locally (without worktree mode) might be the more stable option.

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [February 21, 2026, 12:57pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/6 "2026-02-21T12:57:58Z")

</div>

- 

> Which model are you using when this happens?

GPT-5.3 Codex

- 

> Do you start the worktree agent manually (via the dropdown), or does the agent decide to use worktree on its own?

I start the initial worktree agent manually. The subsequent worktrees are started by the agent itself, and when I’ve asked it why it did, it tells me “Cursor made him do it”.

> Until this is fixed, if you need to keep working, running the agent locally (without worktree mode) might be the more stable option.

How do I spawn an agent to do a separate work from what I’m doing locally?

I can’t use Cloud Agents and now Worktree Agents are also failing.

What do you recommend me?

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [February 21, 2026, 1:14pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/7 "2026-02-21T13:14:55Z")

</div>

> Which model are you using when this happens?

Thanks for the info - GPT-5.3 Codex, noted.

> I start the initial worktree agent manually. The subsequent worktrees are started by the agent itself, and when I’ve asked it why it did, it tells me “Cursor made him do it”.

Got it. That’s the core of the bug then - the agent shouldn’t be spawning additional worktrees on its own.

> How do I spawn an agent to do a separate work from what I’m doing locally?

Right now, if both cloud agents and worktree agents are giving you trouble, the main option is to use local agents in separate chat sessions. You can have multiple chats open side by side, each working on different parts of the codebase - not as isolated as worktrees, but it works for independent tasks that don’t edit the same files.

If you specifically need isolation (same files, different approaches), worktree mode is the only way, and I understand that’s exactly what’s broken for you.

> What do you recommend me?

For the immediate term - try running worktree agents with a different model (Claude Sonnet 4.6 or similar) to see if the cascading behavior is specific to GPT-5.3 Codex. That might narrow things down and also give you a workaround.

I’ve flagged this with the team - no timeline yet, but your detailed report (especially the dangling commit scenario) helps with prioritization. Will update here if there’s news.

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [February 21, 2026, 1:39pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/10 "2026-02-21T13:39:06Z")

</div>

So the short answer is:

There’s no way for me to spawn a new agent in a separate and isolated environment right now, even though I’m paying $600 a month for this.

(aka I’m screwed).

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [February 21, 2026, 1:54pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/11 "2026-02-21T13:54:06Z")

</div>

I get it, this is really inconvenient, especially on Ultra.

You mentioned Cloud Agents also aren’t working. Can you share more details on what exactly is happening there? If it’s a different bug, we might be able to fix that faster and at least get you back to an isolated workflow via cloud.

Also for the worktree bug, try a different model (Claude Sonnet 4.6) like I suggested above. There’s a chance the cascading worktree creation is specific to GPT-5.3 Codex.

I’ll post here if there are any updates.

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [February 21, 2026, 2:05pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/12 "2026-02-21T14:05:28Z")

</div>

> [@deanrie](#):
>
> Can you share more details on what exactly is happening there?

I’ve been sharing details for 4 months already: [Cloud agent can't connect via api3.cursor.sh](https://forum.cursor.com/t/cloud-agent-cant-connect-via-api3-cursor-sh/141088)

This frustration that you’re seeing wasn’t born from one day to the other…

> try a different model (Claude Sonnet 4.6) like I suggested above.

I’m doing a financial application here, where every detail matters. I don’t want a dumber model screwing everything up or introducing a bug that might cost me money later in the future.

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [February 21, 2026, 2:13pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/13 "2026-02-21T14:13:53Z")

</div>

I took another look at your thread about the cloud agent. You provided everything we need, curl requests, console logs, and a video. The issue is clear, and it’s on our side.

This task is in our backlog. I’ll reply here when there’s real news.

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [February 21, 2026, 2:22pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/14 "2026-02-21T14:22:08Z")

</div>

> [@dny\_ex](#):
>
> Cloud agent can’t connect via api3.cursor.sh

You said the same thing 4 months ago: [Cloud agent can't connect via api3.cursor.sh - #8 by deanrie](https://forum.cursor.com/t/cloud-agent-cant-connect-via-api3-cursor-sh/141088/8) ……..

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [February 21, 2026, 4:56pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/16 "2026-02-21T16:56:29Z")

</div>

Can you at least give me some credits for all the tokens I’ve had to waste due to these issues and the many months of not having access to Cloud Agents?

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [March 8, 2026, 9:32pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/18 "2026-03-08T21:32:52Z")

</div>

Any updates on this?

It’s been 15 days since the report and worktree agents keep launching separate worktrees on the same session.

Version: 2.6.11  
VSCode Version: 1.105.1  
Commit: 8c95649f251a168cc4bb34c89531fae7db4bd990  
Date: 2026-03-03T18:57:48.001Z  
Build Type: Stable  
Release Track: Default  
Electron: 39.6.0  
Chromium: 142.0.7444.265  
Node.js: 22.22.0  
V8: 14.2.231.22-electron.0  
OS: Darwin x64 24.6.0

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [March 22, 2026, 8:54pm UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/19 "2026-03-22T20:54:10Z")

</div>

Any update on this?

1 month without Worktree agents and 5 months without Cloud Agents: [Cloud agent can't connect via api3.cursor.sh - #28 by dny\_ex](https://forum.cursor.com/t/cloud-agent-cant-connect-via-api3-cursor-sh/141088/28)

---

<div class="post-metadata">

**Author:** ![dny\_ex](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@dny\_ex](https://forum.cursor.com/u/dny_ex)\
**Post date:** [April 5, 2026, 10:45am UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/21 "2026-04-05T10:45:35Z")

</div>

Any update on this?

1 month and a half without Worktree agents and 5 months and a half without Cloud Agents: [Cloud agent can't connect via api3.cursor.sh - #28 by dny\_ex](https://forum.cursor.com/t/cloud-agent-cant-connect-via-api3-cursor-sh/141088/28)

---

<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:** [April 27, 2026, 10:45am UTC](https://forum.cursor.com/t/worktree-agents-fork-automatically-into-separate-workspaces/152512/22 "2026-04-27T10:45:49Z")

</div>

Closed on April 27, 2026, 10:45am UTC

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