Updated bug reports with version info:
Bug 1: Closed repositories cannot be re-opened
Environment:
- Cursor: 2.2.36 (Universal)
- VSCode Version: 1.105.1
- Commit: 55c9bc11e99cedd1fb93fbb7996abf779c583150
- OS: macOS arm64 (Darwin 25.1.0)
Summary:
When you “Close Repository” in Source Control, the repo is permanently hidden with no UI to restore it.
Root Cause:
Closed repos persist in SQLite at:
~/Library/Application Support/Cursor/User/workspaceStorage/<hash>/state.vscdb
Key: vscode.git → {"closedRepositories":["/path/to/repo"]}
Reproduction:
mkdir ~/tmp/cursor-bug && cd ~/tmp/cursor-bug
git clone --depth 1 https://github.com/cli/cli.git repo-a
git clone --depth 1 https://github.com/junegunn/fzf.git repo-b
git clone --depth 1 https://github.com/sharkdp/bat.git repo-c
for r in repo-a repo-b repo-c; do
cd ~/tmp/cursor-bug/$r && git worktree add "../${r}-wt/branch" -B branch
done
cat > ~/tmp/cursor-bug/test.code-workspace << 'EOF'
{"folders":[
{"name":"cli","path":"repo-a-wt/branch"},
{"name":"fzf","path":"repo-b-wt/branch"},
{"name":"bat","path":"repo-c-wt/branch"}
],"settings":{"scm.alwaysShowRepositories":true}}
EOF
- Open workspace → 3 repos in Source Control ✓
- Right-click “fzf” → Close Repository
- Try to restore: Reload Window, edit workspace file, quit/reopen → repo stays hidden
Workaround:
sqlite3 "~/Library/Application Support/Cursor/User/workspaceStorage/<hash>/state.vscdb" \
"UPDATE ItemTable SET value = '{}' WHERE key = 'vscode.git';"
Bug #2: SCM Repositories Flash and Disappear on Workspace Open
Symptoms
- Open a multi-root
.code-workspace file containing 3+ git repositories
- All repositories briefly appear in the Source Control panel (~0.5-1 second)
- All but one repository disappears
- The remaining visible repository is typically the first folder or one previously opened
- No way to manually re-add the hidden repositories via UI
Root Cause
Cursor stores SCM visibility state in a SQLite database (state.vscdb) within each workspace’s storage directory at:
~/Library/Application Support/Cursor/User/workspaceStorage/<hash>/state.vscdb
The problematic key is scm:view:visibleRepositories:
{
"all": [
"git:Git:file:///path/to/repo1",
"git:Git:file:///path/to/repo2",
"git:Git:file:///path/to/repo3"
],
"sortKey": "discoveryTime",
"visible": [0] // <-- BUG: Only index 0 is visible
}
The visible array should contain [0, 1, 2] but gets corrupted to [0].
Additional failure mode: Cursor sometimes creates a new single-folder storage instead of using the existing workspace storage. The workspace.json file shows:
// Wrong (single folder):
{ "folder": "file:///path/to/first/repo" }
// Correct (workspace file):
{ "workspace": "file:///path/to/my.code-workspace" }
Related Bug: Closed Repositories Can’t Be Reopened
The vscode.git key stores closedRepositories:
{
"closedRepositories": ["/path/to/repo2", "/path/to/repo3"]
}
Once a repository is in closedRepositories, there’s no UI to re-open it.
Workaround / Fix
Before opening the workspace, clear the problematic SQLite state:
# Find workspace storage
WS_FILE="$HOME/.workspaces/my.code-workspace"
STORAGE=$(grep -l "$WS_FILE" ~/Library/Application\ Support/Cursor/User/workspaceStorage/*/workspace.json 2>/dev/null | head -1 | xargs dirname)
# Clear problematic keys
sqlite3 "$STORAGE/state.vscdb" "DELETE FROM ItemTable WHERE key = 'scm:view:visibleRepositories';"
sqlite3 "$STORAGE/state.vscdb" "UPDATE ItemTable SET value = '{}' WHERE key = 'vscode.git';"
If wrong storage was created (single folder instead of workspace):
# Find and remove the wrong storage
grep -l "path/to/folder" ~/Library/Application\ Support/Cursor/User/workspaceStorage/*/workspace.json
# Delete that directory, then reopen the .code-workspace file
Reproduction Steps
- Create a
.code-workspace file with 3+ folders (each a git repo)
- Open it in Cursor
- Source Control shows all repos briefly, then only one remains
- Check
state.vscdb:sqlite3 "$STORAGE/state.vscdb" "SELECT value FROM ItemTable WHERE key = 'scm:view:visibleRepositories';"
- Observe
visible array only contains [0]
Expected Behavior
All repositories in the workspace should remain visible in Source Control, or there should be a UI option to show/hide repositories.
Requested Fix
- Initialize
visible array to include all discovered repositories
- Add UI to show hidden repositories (right-click menu or command palette)
- Don’t persist
closedRepositories without a way to undo
Feature Requests:
- “Reopen Repository” in Source Control context menu
- “Show All Repositories” button
- Clear stale state when
.code-workspace changes