Hey, thanks for the detailed report. This sounds really disruptive.
A few things to try while we investigate:
Extensions check: try launching Cursor from the command line with cursor --disable-extensions and reproduce the branch switch. If the freeze doesn’t happen, it might be an extension conflict, especially Git-related ones like GitLens.
Process Explorer: next time it freezes, before killing it via Task Manager, try Ctrl+Shift+P then Developer: Open Process Explorer if you can access it. This would help identify which process is spiking.
Developer Console logs: open Ctrl+Shift+I before switching branches, then check the Console tab after the freeze for any errors.
Also, a couple questions:
Roughly how large is the repository, like number of files?
How many tabs do you typically have open when the freeze occurs?
Do you have any Git-related extensions installed, like GitLens, Git Graph, etc.?
The team is aware of related issues with Git state management during branch switches. Your report helps with prioritization, so let me know what the diagnostics show.
I did try running Cursor with extensions disabled earlier, and it seemed fine initially, but the same issue started occurring again after about a week of usage.
Regarding extensions, I do use GitLens. However, I’ve been using the same extension in VS Code with a similar workflow and never faced this issue there. That’s why I’m unsure how GitLens would specifically cause this issue in Cursor.
To answer your questions:
Repository size: (you can fill this if needed)
Open tabs: (approx if needed)
Git extensions: GitLens
Also, one additional observation from today:
When I started Cursor today, it showed/applied changes from a PR I had worked on about 5 days ago, even though I had already moved to a different branch and made new changes after that. This further suggests some kind of stale state or caching issue across branches.
Overall, the issue feels more like something related to Git state handling or caching during branch switches rather than purely an extension conflict.
Let me know if you’d like me to capture logs or run any specific debugging steps again.
The fact that --disable-extensions helped for a bit and then the issue came back is interesting. It could mean GitLens isn’t the main cause, but it makes things worse together with how Cursor handles git state when switching branches. The fact that this doesn’t happen in VS Code is a useful detail, noted.
A stale state from a PR from 5 days ago is a pretty serious symptom. This really looks like a git state caching issue across sessions.
A couple requests that would help us move forward:
Repo size. You left this blank. About how many files are in the repo? You can roughly estimate with git ls-files | wc -l in the terminal. Also, how big are the diffs between the branches you’re switching between?
Developer Console logs. Next time, before switching branches, open it, go to the Console tab, and after it freezes, take a screenshot of any errors if you can still scroll in DevTools. This is the most valuable thing for debugging.
As a workaround for now, try switching branches via the terminal using git checkout branch-name instead of the UI, then run Ctrl+Shift+P > Developer: Reload Window. This can avoid a file watcher storm.
The team is aware of this class of issues. Your report helps us prioritize, let me know what you see in the logs.