Cloud Agent UI shows session source branch after git checkout main in VM (workspace branch not reflected)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After a Cloud Agent session checks out a different branch inside the VM (e.g. git checkout main && git pull), the Agents UI still shows the session’s original creation branch (e.g. cursor/setup-dev-environment-d3d0) instead of the actual workspace branch.

In the VM terminal, git branch --show-current correctly returns main, and services run from main, but the UI branch label does not update. This makes it look like the agent is still on the old branch after merging PRs and restarting the project.

Expected: UI shows the current git checkout (main), or clearly separates “Session source branch” vs “Workspace branch”.

Actual: UI keeps showing the immutable session branchName from when the agent was created.

Agent run: https://cursor.com/agents/bc-070c784b-0daf-4b47-8d3b-d6188925d3d0
Repo: GitHub - grigeorge/AI_tools: AI tools list · GitHub
Session branchName: cursor/setup-dev-environment-d3d0
Workspace branch: main (verified via git branch --show-current)

Steps to Reproduce

  1. Start a Cloud Agent session from an old feature branch (example: cursor/setup-dev-environment-d3d0). Session metadata shows branchName: cursor/setup-dev-environment-d3d0.
  2. During the session, merge work to main and have the agent run:
    git fetch origin main
    git checkout main
    git pull origin main
    
  3. In the Cloud Agent terminal, verify:
    git branch --show-current   # → main
    git log -1 --oneline        # → latest commit on main
    
  4. Observe the Cursor Agents UI: the displayed branch still shows cursor/setup-dev-environment-d3d0 (session creation branch), not main.

Expected Behavior

  • UI should reflect the current git checkout in the Cloud Agent workspace (main after checkout), or
  • Clearly separate two labels:
    • Session source branch (where the agent was spawned from)
    • Workspace branch (git branch --show-current)

After git checkout main, the primary branch indicator should update to main.

Operating System

MacOS

Version Information

Version: 3.9.16
VS Code Extension API: 1.105.1
Commit: 042b3c1a4c53f2c3808067f519fbfc67b72cad80
Date: 2026-06-27T06:41:01.941Z
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. The repro steps and version info really help.

This is a display-only bug. The label in the Agents UI shows the branch the session was created from (branchName) and it doesn’t update to the current branch after you run git checkout main inside the VM. Nothing actually breaks though. The agent’s working tree, commits, and the target branch for push/PR follow the currently checked-out branch (main), like you can see in the terminal with git branch --show-current. Only the label is stale.

We’re familiar with this case. I’ve filed an internal report with your repro and bcId. I can’t share an ETA yet, but I’ll post an update in the thread when I have one.

If you notice it’s not just the label and something real is off, like commits going to the wrong branch, let me know. That would be a different issue.