Bug Report: Cursor hangs on file loading page when switching workspaces or on startup

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Description
When switching working directories or starting Cursor, if the previously opened latest file is located in xxx (working tree) or xxx (index), Cursor gets stuck on the file loading page indefinitely.

This issue does not occur when the previously opened file is xxx - that file loads normally.

Steps to Reproduce

Open Cursor with a file in xxx (working tree) or xxx (index)
Close Cursor
Reopen Cursor OR switch to a different working directory
Cursor attempts to restore the previous session
Application hangs on the file loading screen showing the problematic file

Expected Behavior

Cursor should either:

Successfully load the previously opened file, OR
Gracefully skip loading the file and open without hanging

Operating System

MacOS

Version Information

Version: 3.0.16
VSCode Version: 1.105.1
Commit: 475871d112608994deb2e3065dfb7c6b0baa0c50
Date: 2026-04-09T05:33:51.767Z (6 天前)
Layout: editor
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.2.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Thanks for the detailed report — the reproduction steps and version info are really helpful.

I tried reproducing this on my end (opening a git diff tab, quitting Cursor, reopening / switching workspaces) but the diff tab restored normally. The hang you’re seeing likely depends on something specific to your repository or workspace configuration.

Could you help narrow it down? Next time it happens:

  1. Is the repository large or does it use git worktrees/submodules?

  2. After force-quitting and reopening, does the hang always come back, or only sometimes?

  3. Does it help to close all git diff tabs, quit, and reopen? (This would confirm the diff tab restore is the trigger.)

  4. If possible, a screen recording of the hang would be very useful — even just a few seconds showing the stuck loading state.

This will help us pin down what conditions trigger the stall so we can reproduce and fix it.

maybe it use submodules

git init
mkdir test-for-cursor
cd test-for-cursor
git init
go mod init test-for-cursor
git add go.mod

modify go.mod

open diff file `go.mod`

close cursor, and reopen it