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.
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.
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.
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.
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.
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.
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.
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.
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?