I am using worktree to isolate the working environment. however, after the task finish, i remove the worktree, the workspaces still appear even i click Remove from Sidebar, and try to remove the worktree via git or manually, the record still appear.
Hey @cy_c!
Two things going on here. One is expected, one is an actual bug.
Workspace sections are backed by your chat history, not the folder on disk, so deleting a worktree won’t remove the section. To clean it up, archive the chats inside that section (right-click each agent, then choose Archive). Once it’s empty, it should disappear. You can use Remove from Sidebar on any leftover row.
The bug is that “Remove from Sidebar” doesn’t stick. This is a known issue we’re tracking internally. Any later activity in the same repo (or even a relaunch) can bring the removed section back. I’ve attached your report to help us prioritize the fix.
One tip: the built-in worktree option in the Agents Window auto-cleans and won’t create standalone sections. It’s only manually-created worktrees that become permanent workspaces.
Sorry for the hassle in the meantime!
@Colin Thanks for the clarification!
So for now, is archiving all chats in the workspace the recommended way to clean it up?
Regarding worktree isolation, the checkout workflow does not fully match how I use worktrees. I normally keep the main repository workspace open for my own work, and create a separate worktree for background tasks, opening it as its own Cursor workspace.
This lets me and the agent work in parallel in separate directories. However, Cursor’s checkout option only allows selecting the branch, not directly opening or managing the worktree directory as a separate workspace.
Yes, archiving all chats should do the trick.
And, we should ship a fix in 3.14 so that workspaces don’t reappear after you click “Remove from sidebar”.