Sometimes when we open the IDE it shows loading ui at the top and gets stuck with that, the branches name at the bottom are not visible, even on the changes tab it shows No source providers registered.
Steps to Reproduce
It’s random but frequent whenever I open a project that hasn’t loaded in few hours or a closed project it goes into loading state.
Expected Behavior
It should show the branch name and github repository it’s attached with and it should not show the loader at top
These are subfolders with hash-like names. You can find the right one by running grep for your project path in workspace.json. If you only have a few workspaces, you can delete everything there.
Open Cursor and the project again.
We’re tracking this issue on our side, but I can’t share an ETA for a fix yet. If the workaround helps, let me know. If it doesn’t, please tell me too, and we’ll look at the logs from Output > Extension Host. Also, if you notice any trigger like a specific action, extension, or MCP, that would really help narrow it down.
On my side I’ve had theses “episodes” of Cursor completely lagging and the git panel loading more or less daily. It seems to be triggered when a lot (let’s say 10+) files are in “review” after an agent has ran ? Not sure if there is any connection but I have prettier on staged files configured and its seems maybe be linked.
Hey, this is the same known bug with the Extension Host timeout on 3.1.17. We’re already tracking it on our side, and there’s no ETA for a fix yet.
Your hint about review files and running prettier on staged files is helpful, and it might be one of the triggers. To add this to the ticket, a few questions:
When the git panel gets stuck, can you open Output > Extension Host and Output > Log (Window) and share the last lines? I’m especially interested in anything with TIMEOUT or extension host.
What exact pre-commit hook are you using, husky + lint-staged, or just prettier --write? Also, about how many files are staged when it happens.
Your Cursor version from Cursor > About, and your macOS version.
For now the workaround is the same as above: fully quit Cursor, delete ~/Library/Application Support/Cursor/User/workspaceStorage/ for the affected workspace, then open it again. If Developer: Reload Window from the Command Palette via Cmd+Shift+P helps faster, that’s also a useful signal.
I have attached the logs you asked for + a screenshot of what I had going on (not much). It started hanging at the end seemingly when the git tool calls were made.
In the log files, I have only copied an extract, but it was spamming the same content for ~5 minutes until it finally settled.
Hey, thanks, the logs are really helpful. I can see the root cause in them: Cursor’s main process is hitting the file descriptor limit, so it can’t spawn child processes, including ps for process monitoring every second. That’s why you’re seeing lots of EMFILE errors, and as a result the Extension Host becomes unresponsive and the git panel freezes.
Cursor spawns ps every second to monitor extensionHost processes, and together with file watchers on a large monorepo plus husky/lint-staged plus a couple of agents, it looks like you’re exhausting the default macOS ulimit -n.
Can you check this and try raising the limit:
In a normal terminal, run ulimit -n. This is the soft limit for shells, but Cursor inherits the limit from the process that launched it, usually launchd.
For GUI apps on macOS, the limit is set via launchctl limit maxfiles. You can temporarily raise it with:
sudo launchctl limit maxfiles 524288 524288
Then restart Cursor with a full quit, not just Reload Window.
When it happens again, in another terminal you can check how many FDs the Cursor process has open:
lsof -p <Cursor main pid> | wc -l
If it’s close to the limit, that confirms the hypothesis.
The pattern where the main process does spawn ps is on our radar, it’s known behavior. I can’t share an ETA for an optimization yet.
If raising maxfiles makes your sessions stable, let me know. That’s a useful signal.
These are subfolders with hash-like names. You can find the right one by running grep for your project path in workspace.json. If you only have a few workspaces, you can delete everything there.
Open Cursor and the project again.
I’ve created created a shell script that will do this for you:
#!/bin/bash
#
# cursor-clear-workspace.sh
# Backs up Cursor workspaceStorage folders matching a given repo name.
#
# Usage: ./cursor-clear-workspace.sh <repo-name>
# Example: ./cursor-clear-workspace.sh some-repo-name
set -euo pipefail
# --- Check argument ---
if [ $# -ne 1 ]; then
echo "Usage: $0 <repo-name>"
exit 1
fi
REPO_NAME="$1"
WORKSPACE_DIR="$HOME/Library/Application Support/Cursor/User/workspaceStorage"
BACKUP_DIR="$HOME/cursor-workspace-backup/$(date +%Y%m%d-%H%M%S)-$REPO_NAME"
# --- Sanity checks ---
if [ ! -d "$WORKSPACE_DIR" ]; then
echo "Error: workspaceStorage not found at:"
echo " $WORKSPACE_DIR"
exit 1
fi
cd "$WORKSPACE_DIR"
# --- Find exact matches (path segment match, not substring) ---
MATCHES=$(grep -lE "[/\"]${REPO_NAME}[/\"]" */workspace.json 2>/dev/null || true)
if [ -z "$MATCHES" ]; then
echo "No workspaces found matching '$REPO_NAME'."
exit 0
fi
# --- Show matches and confirm ---
echo "Found the following workspace(s) matching '$REPO_NAME':"
echo "$MATCHES" | while read -r match; do
folder=$(dirname "$match")
project=$(grep -oE '"folder"[^,}]*' "$match" || echo "(unknown)")
echo " - $folder $project"
done
echo
read -r -p "Move these to backup at $BACKUP_DIR? [y/N] " CONFIRM
if [[ ! "$CONFIRM" =~ ^[Yy]$ ]]; then
echo "Aborted."
exit 0
fi
# --- Back up ---
mkdir -p "$BACKUP_DIR"
echo "$MATCHES" | while read -r match; do
folder=$(dirname "$match")
mv "$folder" "$BACKUP_DIR/"
echo "Moved $folder -> $BACKUP_DIR/"
done
echo
echo "Done. Backup location:"
echo " $BACKUP_DIR"
echo
echo "Next steps:"
echo " 1. Fully quit Cursor (Cmd+Q)."
echo " 2. Reopen your project."
echo " 3. If it didn't help, restore with:"
echo " mv \"$BACKUP_DIR\"/* \"$WORKSPACE_DIR/\""
@sawongam On Linux the pattern is similar, but the workspaceStorage path is different. Try the same workaround:
Fully close Cursor.
Delete or back up ~/.config/Cursor/User/workspaceStorage/ (you can remove the whole folder if you only have a few workspaces. Otherwise find the right one by checking workspace.json via grep).
Reopen the project.
If it still doesn’t help, please share:
Your Cursor version Cursor > About and your Arch build info (kernel and DE).
The last lines from Output > Extension Host and Output > Log (Window), especially anything with TIMEOUT, EMFILE, or extension host unresponsive.
Whether you use husky or lint-staged, big monorepos, lots of active file watchers, anything that could increase the number of open file descriptors.
We’re tracking this issue, but I can’t share an ETA for a fix yet.