Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Environment
- Cursor 3.12.17, macOS (Darwin 25.5.0), Apple Silicon
- git 2.50.1 — all worktree commands resolve correctly at the CLI
(rev-parse --show-toplevel/--git-dir/--git-common-dir,rev-parse --abbrev-ref HEAD) - A set of linked git worktrees, each opened as its own window
Summary
Opening a git worktree folder leaves the ${activeRepositoryBranchName} window-title
variable empty, so "window.title": "${activeRepositoryBranchName}${separator}${rootName}"
shows only the folder name. ${activeRepositoryName} is empty too. This worked before and
regressed after a recent update. A normal (non-worktree) clone shows the branch fine.
Steps to reproduce
git worktree add ../wt-feature feature/my-branch- Open
../wt-featureas a folder in Cursor - In user
settings.json:"window.title": "${activeRepositoryBranchName}${separator}${rootName}" - Focus a source file; open the Source Control panel
Expected: title shows feature/my-branch — wt-feature
Actual: title shows only wt-feature; the branch variable is blank
Evidence
From logs/<session>/window<N>/exthost/vscode.git/Git.log:
[Model][openRepository] Opened repository: ~/wt-feature
[Model][openRepository] Opened repository (kind): worktree
[Git][getWorktreesFS] Worktree detection is disabled, skipping worktree detection
[Git][revParse] Unable to read file: ENOENT, open
‘~/myrepo/.git/worktrees/wt-feature/refs/remotes/origin/feature/my-branch’
revParse reads refs from the per-worktree gitdir (.git/worktrees/<name>/refs/...)
instead of the common dir (.git/refs/...), so it ENOENTs every refresh. It falls back
to the git CLI (so this line is only a warning), but the SCM history provider’s
historyItemRef that feeds ${activeRepositoryBranchName} never gets populated.
Notes
- Also affects
${activeRepositoryName}(empty). - Workspace/folder-scoped
window.titlein.vscode/settings.jsonis not applied to
the title bar (only the user-globalwindow.titleis honored), so a per-worktree static
title workaround doesn’t work either. - Related upstream: microsoft/vscode #251596 and #267612.
Steps to Reproduce
- git worktree add ../wt-feature feature/my-branch
- Open ../wt-feature as a folder in Cursor (its own window)
- In user settings.json set:
“window.title”: “${activeRepositoryBranchName}${separator}${rootName}” - Focus a source file, and open the Source Control panel (Cmd+Shift+G)
- Reload the window (Cmd+Shift+P → Reload Window)
Expected Behavior
The title bar shows the branch, e.g. feature/my-branch — wt-feature
(as it does for a normal, non-worktree clone, and as it did before a recent update).
Screenshots / Screen Recordings
![]()
Operating System
MacOS
Version Information
Cursor 3.12.17 (commit 0fb762053c34788bb7760d5673f8a6d4c8589d50, VS Code 1.128.0)
Does this stop you from using Cursor
No - Cursor works, but with this issue
