When a new workspace is opened using a specific git worktree path, the system initially recognizes it as a distinct catalog. However, shortly after starting Plan mode, the worktree environment is incorrectly merged back into the base project. This causes the application to lose the worktree context and execute the plan against the base project instead of the intended worktree directory.
Hey, thanks for the clear report with steps. We can reproduce it on our side. It’s a known bug: the new Agents Window plus worktree loses context and falls back to the base project. I can’t share an ETA for a fix yet, but I logged your report internally.
As a temporary workaround on 3.2.16, open the worktree in a separate Cursor window, not via Open Workspace inside an already open window with the base project. That keeps the contexts separate and Plan mode stays in the worktree. Not perfect, but it should hold until we ship a fix.
If you notice the agent starting to write to the base repo, stop it and check the sidebar, otherwise the changes may land in the wrong place.
We’ll post an update in this thread once there’s news on the fix.
Hey, I said I’d come back with an update. Since your report, we’ve made a bunch of improvements to how the Agents Window works with git worktrees. You’re on 3.2.16, which is pretty far behind the current stable 3.16.29, so some of the worktree context loss issues in your build may already be different.
Please update to the latest version and try the same flow: open the worktree via Open Workspace, then start Plan mode. If the worktree context still gets lost and the plan ends up in the base project, please start a new thread with fresh details like your version, steps, and if possible the Request ID, and we’ll take another look.
I’m going to close this thread for now. If it happens again on the latest version, let us know in a new one.