Scanning folder for git repositories is taking forever

Hey, thanks for the report. These two issues are most likely related. When git scanning hangs, it blocks the extension host, and because of that the agent can’t start and shows “Agent execution timed out”.

Git repository scanning can sometimes get stuck in an infinite loop, especially on remote servers. A similar case is described here: Cursor Git tab hangs due to invasive ripgrep scanning on network/FUSE mounts (Linux).

A few questions to better understand what’s going on:

  1. What OS is running on the remote server (Linux distro and version)?
  2. What Cursor version are you on?
  3. Does the server use NFS, FUSE, or any other network file systems?
  4. Roughly how big is the working directory you’re opening?

As a workaround, please try:

  • After reconnecting, run CMD/CTRL+Shift+P then “Developer: Reload Window”
  • Open the project folder itself, not a higher-level parent folder
  • In Settings, try disabling git with "git.enabled": false (you’ll lose git integration, but the agent should work)

Let me know if any of these workarounds help.