In the new UI, branch handling can be very confusing.
Here is my buggy state: (see screenshots)
As you can see the UI is stuck on the wrong branch and is not picking up the existing PR either when it should.
Steps to Reproduce
I got here as follows
New agent 1 and branch in main repo, work, create pr
New agent 2in HOME folder, agent decides to create a branch forking from the current and commits there
I switch to agent 2 and see that I am now on the new branch so I ask it to return to the old one. Git works, agent does, but UI doesn’t pick it up
Expected Behavior
The UI should refresh along git.
Also the UI should guide the user better to create completely fresh branches (from remote master, not from whatever is local) with the chips and let user choose between new branch in existing repo/worktree or new worktree
This is a known bug in the Glass layout. The branch label in the diff header shows a stored snapshot from when the conversation was created, rather than the live git branch, so it doesn’t update when you or the agent switches branches externally. The PR detection has the same root cause – it looks at the stored branch association rather than the current one.
A few other users have reported the same class of issue:
The team is actively working on improving branch visibility and management in Glass. For now, switching to the Editor view (which you can do from the layout picker) gives you the standard branch/git UI as a workaround.
The Cursor UI showed the wrong active Git branch in the status bar (displayed main) while the repository was actually checked out on staging. Integrated terminal output from Git matched staging (git branch --show-current, git status -sb). After restarting Cursor, the UI matched Git again. Single-folder workspace, one repo root.
Steps to Reproduce
Open a local Git repo in Cursor (single workspace folder).
Check out branch staging (verify in terminal: git branch --show-current).
Compare branch name shown in the Cursor status bar / SCM UI with Git output.
(Optional) Have GitHub PR / diff views open; unclear if related.
Observe mismatch; restart Cursor and compare again.
Expected Behavior
The branch shown in the UI (status bar / source control) should always match the current HEAD branch reported by Git in the same workspace.
Any update on this? The problem is getting more serious right now. I was running several worktrees but it suddenly all become the base project. The terminals was lost.
Yeah, same here. It works fine with a single task/PR, but when parallelizing work with multiple worktrees the whole UI is stale: branches, PRs, and the “stage” (commit/push/create PR/merge button).
Unfortunately, It defeats the whole purpose of the worktrees.
No timeline to share yet, but the Glass branch and worktree experience is being reworked by the team. The stale branch label, PR detection, and stage button issues you’re describing are all tracked.
@Petr_Chmelar – your report (status bar showing main instead of staging, fixed by restart) is the same class of issue. Thanks for adding your version details.
@benlau – worktrees reverting to the base project and losing terminals sounds like it could be a separate, more severe problem. Could you share your Cursor version and what you were doing right before it happened (opening a new conversation, restarting Cursor, etc.) in a new thread, please? A short screen recording would help narrow down the trigger.
@benlau — thanks for the detailed repro steps and version info. What you’re describing (external worktree merging back into the base project in the sidebar) is a different issue from the stale branch label bug in this thread. External worktree handling is being reworked separately.
Could you post those repro steps in a new thread? That way the team can track and prioritize it independently. Include what you shared here (the git worktree add command, “Open Workspace” flow, version 3.2.16) and a screen recording if possible.