When having an agent chat thread, 1000s of git processes are created as children of the cursor process. This is making the computer unusable and throttling at 100% cpu usage.
$ ps aux | grep git | grep -v grep | wc -l
4810
Steps to Reproduce
Seems be started when having a chat. If you stop the chat and kill the git processes then everything gets back to normal. Restarting the chat leads to more processes starting and the machine getting slow again.
Hi Riley,
This is a known issue that our team is actively investigating. During active agent sessions, the extension host can spawn excessive git processes for repository state checks, and these sometimes pile up without proper cleanup, leading to the CPU saturation you’re seeing.
While the fix is being worked on, here are a couple of things that should help:
Disable the built-in Git extension if you don’t rely on Source Control features. Open the Extensions panel, search for @builtin git, and disable “Git” temporarily. This stops the git process from spawning entirely.
Reduce git auto-refresh frequency: In Settings, search for git.autorefresh and set it to false. Also set git.autoRepositoryDetection to false if you’re working in a workspace with multiple repos.
If it happens again, you can quickly kill all the stuck git processes without restarting Cursor:
pkill -f '/opt/homebrew/bin/git'
Let us know if reducing the git auto-refresh helps, or if the issue still occurs even with those settings adjusted.