Git source control not detected in multi-root .code-workspace

Hey, thanks for the detailed report with logs and repro steps.

This is a known issue with multi-root workspaces. The Git extension sometimes gets an empty list of workspace folders during the initial scan due to a race condition on activation. Your workaround using git.scanRepositories is the right approach.

Another option that has helped other users is to set:

"git.autoRepositoryDetection": true

In Cursor, this defaults to "openEditors" unlike VS Code where it’s true, so the scan can skip repos if there are no files open from them. More details here: Can only access main folder in source control

After changing the setting, you need a full restart using Cmd+Q, then open Cursor again.

If the issue comes back after restart, you can try resetting the cached SCM state in state.vscdb. Details are here: Cursor not recognizing all of git repos within workspace

The team is aware of this issue and it’s showing up for multiple users. Your report helps us prioritize it. Let me know if the setting fixed it.