Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
After fixing AppArmor profile issues that prevent the sandbox from starting (see prerequisites below), sandboxed commands fail at the pre-discovery step:
Error: Failed to apply sandbox: IO error: Step 0/7 (pre-discovery) failed: IO error: ripgrep execution failed (binary: /usr/share/cursor/resources/app/node_modules/@vscode/ripgrep/bin/rg): No such file or directory (os error 2)
The binary exists, is statically linked, and runs correctly outside the sandbox:
$ file /usr/share/cursor/resources/app/node_modules/@vscode/ripgrep/bin/rg
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, stripped
$ /usr/share/cursor/resources/app/node_modules/@vscode/ripgrep/bin/rg --version
ripgrep 15.1.0-cursor4 (rev 07f36110f4)
The sandbox creates a mount namespace that does not bind-mount /usr/share/cursor/, making the binary invisible from inside the namespace.
Prerequisites: related AppArmor profile issues (separate bugs, must be fixed first):
- AppArmor cursor-sandbox profile incomplete on Linux — sandbox does not work correctly (missing network, signal, userns)
- Cursor-sandbox-remote AppArmor profile missing abi declaration and network rule — breaks sandbox on Ubuntu 24.04+
Steps to Reproduce
- Install Cursor 2.6.11 via .deb on Ubuntu 24.04 with kernel 6.14
- Install
cursor-sandbox-apparmor0.2.0 - Fix both AppArmor profiles as described above and reload them
- Restart Cursor
- Run commands in agent mode — some or all fail with the ripgrep error
Expected Behavior
The sandbox’s mount namespace should include /usr/share/cursor/ (or at least the ripgrep binary path) so that pre-discovery can run. The binary is Cursor’s own — the sandbox should always be able to find it.
Operating System
Linux
Version Information
- Cursor 2.6.11 (also reproduced on 2.5.26), x64, installed via .deb
- cursor-sandbox-apparmor 0.2.0
Additional Information
Environment:
- Ubuntu 24.04.4 LTS
- Kernel 6.14.0-37-generic
- AppArmor 4.0, profiles patched and loaded (see prerequisites)
- Unprivileged user namespaces enabled (
/proc/sys/kernel/unprivileged_userns_clone= 1)
Does this stop you from using Cursor
No - Cursor works, but with this issue