Cursor’s cursorsandbox processes can become orphaned, holding locks on project files and preventing builds. These processes persist even after fully quitting Cursor and cannot be terminated by the user without root privileges, forcing a reboot to recover.
The sandbox processes run in a Linux user namespace with UID 0 (root) inside, mapped to the regular user outside. Due to kernel security restrictions, signals cannot cross user namespace boundaries to namespace-privileged processes. This means kill -9
returns “Permission denied” even though ps shows the process owned by the current user.
Steps to Reproduce
Run sandbox tasks in Cursor (e.g., build commands)
Cancel tasks or experience a hang
Quit Cursor completely
Attempt to build the project outside Cursor - fails due to locked files
Observe orphaned cursorsandbox processes via ps aux | grep cursorsandbox
Attempt kill -9 - fails with permission denied
Expected Behavior
• Sandbox processes should be terminated when Cursor exits
• Cancelled tasks should release file locks immediately
• If user namespace isolation is used, the parent process should ensure cleanup before exit
For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)
For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…
Additional Information
Add any other context about the problem here.
Does this stop you from using Cursor?
Yes - Cursor is unusable
Sometimes - I can sometimes use Cursor
No - Cursor works, but with this issue
The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!
⛬Additional finding and how I fixed it without reboot:
The root cause is Cursor’s AppArmor profile (/etc/apparmor.d/cursor-sandbox) which grants capability sys_admin to the sandbox processes. This makes orphaned processes immune to kill -9 even from
root.