Using move_agent_to_root when moving to git worktree recognized like cursor-managed-worktree

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

when the agent use the move_agent_to_root mcp to move from one git worktree to another git worktree of the same repo, instead of resulting in the agent in just move to the another worktree, it’s resulting in the agent actually move to the another worktree (as expected), but visually, the agent move to the base-repo workspace, with the cursor-managed-worktree icon near it.

as you can see in the picture below, the root of the agent is correct, its
~/weka_worktrees/643262…
but it’s not under 643262... workspace, it’s under wekapp which is the repo base-worktree

Steps to Reproduce

preconditions:

  • repo base worktree (repo).
  • two git worktrees of the repo (worktree1, worktree2).

open a new chat in worktree1.
agent use the move_agent_to_root mcp to worktree2

Expected Behavior

I expect to see the agent as regular session (without the worktree icon) under worktree2 workspace.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.11.25
VS Code Extension API: 1.125.0
Commit: fc2563ec93d793fc275eef734405a4fdf8b47b20
Date: 2026-07-15T01:27:41.754Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

Does this stop you from using Cursor

Yes - Cursor is unusable

This isn’t a functional problem. Your agent’s actual root is correct (~/weka_worktrees/643262...), so it’s running in the right worktree - what you’re seeing is purely how the Agents Window groups and labels the chat.

As of a recent update, worktrees are intentionally grouped under their source repo and shown with the worktree badge, rather than as a standalone workspace - and this now applies to worktrees you create yourself with git worktree add, not just Cursor-managed ones. So the placement under wekapp with the worktree icon is expected behavior, not a bug.

I understand you’d rather have each manually-created worktree treated as its own separate project in the Agents Window. That isn’t available today, so I’ll track this as a feature request to gauge interest. A couple of others have asked for the same thing here: Agent window worktree chats collapsing into repository root - feel free to add your workflow there.