Status bar shows comma-separated git branches from multiple repos in multi-root workspace

Describe the Bug

In a multi-root .code-workspace with 6 separate git repos, the bottom-left git branch indicator shows a comma-separated list of branch names from different repos, truncated so only the first name is visible.

Example label:
cursor/mail-work-31fe, feat/matrix-company-video-a-record, main, feat/matrix-well-known, feat/matrix-well-known-cors

Only “cursor/mail-work-31fe, feat…” is visible in the tiny status bar slot.

After Developer: Reload Window, the behavior persists.

The displayed branch names are wrong in two ways:

  1. They do not match actual git branch --show-current output in the terminal.
  2. They do not match the branches the agent is actually operating on when it runs git commands or reports git context in chat.

So the status bar is not just unreadable — it is misleading relative to both terminal ground truth and agent git awareness. Some names appear to be stale or agent-created branches that are not current HEAD in any repo.

Terminal ground truth:

  • terraform-matrix: main
  • terraform-dns-company-video: feature/workflow-dispatch (UI showed feat/matrix-company-video-a-record)
  • datacentre: main (UI showed cursor/mail-work-31fe)
  • terraform-proxmox-vm-ingress: main
  • terraform-staticsite-company-video: feature/company-api-com (UI showed feat/matrix-well-known-cors)
  • company.video_website: fix/gate-website-deploy-to-main (UI showed feat/matrix-well-known)

Agent ground truth also disagrees with the status bar. When asking the agent which branch each repo is on, or when it runs git branch --show-current per repo via Shell, the answers match terminal output — not the comma-separated list in the status bar.

Example: status bar showed cursor/mail-work-31fe, but datacentre is on main in both terminal and agent Shell output in the same session.

This suggests the status bar is showing a corrupted or cached multi-root git summary, not the live branch state for the active repo, and not the branch context the agent is actually using.

This may be part of the broader multi-root git scoping problems discussed here:

This report is specifically about the status bar branch indicator showing an incorrect comma-separated list of branch names from multiple repos. It is distinct from Shell tool cwd, but related to broken multi-root git context in the UI.

Steps to Reproduce

  1. Create a .code-workspace file with 6 separate git repos as workspace folders (project-alpha through project-zeta; each folder is its own git repo; one uses a git worktree).

  2. Open the multi-root workspace using one of these methods (Agents Window has no File → Open):

    a. Double-click the .code-workspace file in Finder to open it in the Editor, then Cmd+Shift+P → “Open Agents Window”; or

    b. From terminal: cursor /path/to/your.code-workspace, then switch to Agents Window; or

    c. In Agents Window sidebar: “Setup a Workspace” (select the repo folders), or “Open a Workspace” (pick a previously used workspace).

  3. Developer: Reload Window.

  4. Look at the bottom-left git branch indicator in Agent/chat layout.

  5. Click or copy the branch label, it returns a comma-separated list mixing branches from different repos.

Expected Behavior

The status bar shows one branch name for the currently active repo only (standard VS Code behavior), e.g. main.

It should not concatenate branch names from multiple workspace roots into one label.

If multiple repos are open, git context should remain scoped per repo - not merged into a single unreadable status bar string.

Operating System

MacOS

Version Information

Version: 3.5.33
VSCode Version: 1.105.1
Commit: aac81804b986d739acab348ed96b8bea6e83cc50
Date: 2026-05-22T06:47:48.039Z
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.5.0

For AI issues: which model did you use?

N/A

Does this stop you from using Cursor

No - Cursor works, but with this issue

This is a known issue - actually two related problems:

  1. The comma-separated display: The status bar currently joins branch names from all tracked repos in a multi-root workspace into a single label. A recent fix addressed the case where repos share the same branch name (those now collapse to one), but distinct branches from different repos still concatenate. Not useful in a 6-repo setup.

  2. The stale/wrong branch names: The branch values shown can become stale when branches change outside the UI’s awareness (terminal checkouts, worktree operations, etc.). This explains why they disagree with both your terminal output and the agent’s own git context.

Both issues are being actively reworked by the team under a git/SCM-focused priority initiative. Unfortunately, there’s no workaround for the multi-root display issue right now - the status bar is pulling from all repos by design (the fix is to scope it to the active repo only).

I don’t have a timeline to share, but this area is actively prioritized.