Agents/Glass UI reports wrong branch

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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

  1. New agent 1 and branch in main repo, work, create pr
  2. New agent 2in HOME folder, agent decides to create a branch forking from the current and commits there
  3. 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

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.1.15
VSCode Version: 1.105.1
Commit: 3a67af7b780e0bfc8d32aefa96b8ff1cb8817f80
Date: 2026-04-15T01:46:06.515Z
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.3.0

For AI issues: which model did you use?

Opus 4.7

Does this stop you from using Cursor

Yes - Cursor is unusable

Hi Alexandros!

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.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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

  1. Open a local Git repo in Cursor (single workspace folder).
  2. Check out branch staging (verify in terminal: git branch --show-current).
  3. Compare branch name shown in the Cursor status bar / SCM UI with Git output.
  4. (Optional) Have GitHub PR / diff views open; unclear if related.
  5. 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.

Operating System

MacOS

Version Information

Version: 3.2.11
VSCode Version: 1.105.1
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.3.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Any update on this?

It kind of defeats the purpose of the Glass UI, since one has to use other tools to inspect the PR.

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.

Upgraded Cursor to Version: 3.2.16, the behaviour is changed , but it become totally useless for worktree.

Step 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

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

I guess that it is assumed worktrees are created within the UI and in their custom folder, etc.
In general Glass owns all git ops.

@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.

Done.