Agent Windows: Git worktree context lost after being incorrectly merged into base project

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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.

Steps to Reproduce

  1. git worktree add ../worktree-my-project/issue_num branch

  2. Copy the worktree path

  3. Press Open Workspace with the worktree path, type the prompt and run Plan mode.

  4. In the side bar, it will show a new catalog for the worktree

  5. A few second later, the item will be merged to the base project, and it forgot the worktree and run the plan on the base project

Expected Behavior

The worktree agent should remain independent of the base project.

Operating System

MacOS

Version Information

Version: 3.2.16
VSCode Version: 1.105.1
Commit: 3e548838cf824b70851dd3ef27d0c6aae371b3f0
Date: 2026-04-28T21:07:47.682Z
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

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.