Cursor should cleanup worktrees if chat was archived

Feature request for product/service

Cursor IDE

Describe the request

I noticed that Cursor do not cleanup worktree when I am done with the task (no local changes left) and archived the chat.

My proposition is to clean up worktree to release the branch name.
At the moment for some reason my branch at “local” was moved to worktree and sits there. Thus blocking me to checkout to that branch locally.

After worktree was cleaned up, that “tree” branch should become regular branch name.

Operating System (if it applies)

MacOS

Hey @Eugen_Konkov!

This makes sense and will probably be the direction we go in. Right now, the cleanup is automatic and documented here, but based on time and # of stale worktrees, not on archival.