Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
In a multi-root workspace (opened via a .code-workspace file), the Git extension’s initial repository scan completes in ~1ms and finds 0 repositories, even though each workspace folder is a valid Git repo with a .git directory. The Source Control panel shows “No source control providers registered.” This does not happen in single-folder workspaces — only multi-root .code-workspace setups are affected.
The Git extension log confirms the issue:
[Model][doInitialScan] Initial repository scan started
[Model][doInitialScan] Initial repository scan completed - repositories (0), closed repositories (0), parent repositories (0), unsafe repositories (0)
The scan appears to receive an empty workspace folders list, completing instantly without checking the filesystem.
The workspace state DB still retains the correct repos from previous sessions (scm:view:visibleRepositories has all 4 repos), confirming this previously worked.
Workaround:
Adding explicit git.scanRepositories to the workspace file settings bypasses the broken auto-detection:
{
"settings": {
"git.scanRepositories": ["repo-a", "repo-b"]
}
}
Steps to Reproduce
- Create a .code-workspace file with multiple folders, each being a separate Git repo:
{
"folders": [
{ "path": "repo-a" },
{ "path": "repo-b" }
]
}
- Open the workspace file in Cursor via File > Open Workspace from File
- Check the Source Control panel, shows “No source control providers registered”
- Verify repos work fine from the terminal (git status succeeds in each folder)
Expected Behavior
The Git extension should detect and register all Git repositories defined in the .code-workspace folders, just as it does for single-folder workspaces.
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
Does this stop you from using Cursor
Yes - Cursor is unusable