Sandbox processes persist after Cursor exit and cannot be killed by user

Where does the bug appear (feature/product)?

[x] Cursor IDE

Describe the Bug

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

  1. Run sandbox tasks in Cursor (e.g., build commands)
  2. Cancel tasks or experience a hang
  3. Quit Cursor completely
  4. Attempt to build the project outside Cursor - fails due to locked files
  5. Observe orphaned cursorsandbox processes via ps aux | grep cursorsandbox
  6. 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

Screenshots / Screen Recordings

N/A

Operating System

[x] Linux

Ubuntu 24.04.4 LTS, kernel 6.8.0-111-generic

Version Information

IDE: 
Version: 3.2.21 
Commit: 806df57ed3b6f1ee0175140d38039a38574ec720 
Arch: x64 

For AI issues: which model did you use?

N/A - not an AI issue

Additional Information

Workaround: sudo pkill -9 -f cursorsandbox

Does this stop you from using Cursor?

[x] Yes - Cursor is unusable

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the Bug Reports category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

Bug Report Template - Click to expand

Where does the bug appear (feature/product)?

  • Cursor IDE
  • Cursor CLI
  • Background Agent (GitHub, Slack, Web, Linear)
  • BugBot
  • Somewhere else…

Describe the Bug
A clear and concise description of what the bug is.


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!


Expected Behavior
What is meant to happen here that isn’t working correctly?


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
IDE:
Version: 2.xx.x
VSCode Version: 1.105.1
Commit: ......

CLI:
CLI Version 2026.01.17-d239e66

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.

Workaround:

bash
sudo aa-complain /etc/apparmor.d/cursor-sandbox
sudo kill -9 $(pgrep -f cursorsandbox)
sudo aa-enforce /etc/apparmor.d/cursor-sandbox

This temporarily puts the AppArmor profile in complain mode, kills the processes, then re-enables enforcement.

Note: apparmor-utils package is required (sudo apt install apparmor-utils).

Hey @LailokenWork!

Thanks for the feedback! Has also been discussed over here:

And we raised a bug ticket. Will attach your report as well!

Hey @LailokenWork,

The unkillable cursorsandbox processes on Ubuntu 24.04+ were fixed in a recent Cursor update! The AppArmor profile for the Sandbox should now let the host signal those processes so they can be terminated normally.

Please try again on 3.7.36+!

I still have the exact same issue, even though I’m using the latest version of Cursor IDE.

Hey @shiltian

It would be really helpful for you to raise a new bug report! We have multiple users confirming that the issue has been fixed.

I’d be particularly interested in whether your /etc/apparmor.d/cursor-lab-sandbox file has signal (receive) peer=unconfined present.

I don’t have /etc/apparmor.d/cursor-lab-sandbox, but instead /etc/apparmor.d/cursor-sandbox-remote. Its contents are:

profile cursor_sandbox_remote /home/*/.cursor-server/bin/*/*/resources/helpers/cursorsandbox {
  file,
  /** ix,

  capability sys_admin,
  capability net_admin,
  capability chown,
  capability setuid,
  capability setgid,
  capability setpcap,
  network unix,
  network inet stream,
  network inet6 stream,
  network netlink raw,

  ## Uncomment this on AppArmor 4.0
  #userns,

  mount,
  remount,
  umount,

  /home/*/.cursor-server/bin/*/*/resources/helpers/cursorsandbox mr,
}

profile cursor_sandbox_agent_cli /home/*/.local/share/cursor-agent/versions/*/cursorsandbox {
  file,
  /** ix,

  capability sys_admin,
  capability net_admin,
  capability chown,
  capability setuid,
  capability setgid,
  capability setpcap,
  network unix,
  network inet stream,
  network inet6 stream,
  network netlink raw,

  ## Uncomment this on AppArmor 4.0
  #userns,

  mount,
  remount,
  umount,

  /home/*/.local/share/cursor-agent/versions/*/cursorsandbox mr,
}

Is it something wrong on my side? I installed it some time ago via:

curl -fsSL https://downloads.cursor.com/lab/enterprise/cursor-sandbox-apparmor_0.6.0_all.deb -o cursor-sandbox-apparmor.deb
sudo dpkg -i cursor-sandbox-apparmor.deb

I’ll open a new ticket if my set up is fine.

Hm. Are you using Remote SSH or the Cursor CLI?

I’d really recommend a fresh bug report, with all the details about your setup and the issue you’re encountering. Feel free to link it here once it’s created!

  • I am on Linux Mint 22.3 - Cinnamon 64-bit
  • I am on cursor 3.12.17
  • I am not seeing anything in the apparmor logs or journalctl logs.
  • I do have signal (receive) peer=unconfined, in /etc/apparmor/cursor-sandbox file.
  • I can do sudo killall -9 cursorsandbox and it will remove them all
  • Multple processes hang around even after the cursor ide is shutdown.
  • This is with the regular IDE, not ssh, remote, or CLI

signals are no longer blocked but the parent lifecycle management is still failing