Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor’s sandbox is missing mount path to zsh, making all commands fail with the following error:
Failed to exec /run/current-system/sw/bin/zsh: No such file or directory (os error 2)
This is because on NixOS, the generated /etc/passwd specifies that path as shell path, but it looks like in Cursor’s custom sandbox /run is fully replaced, only re-mounting specific paths from original system’s /run in the sandbox.
/nix/store is mounted however, so commands are accessible if pointing directly to them.
In general, with $PATH being:
/run/wrappers/bin:/home/user/.nix-profile/bin:/nix/profile/bin:/home/user/.local/state/nix/profile/bin:/etc/profiles/per-user/user/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
since some of these are missing (specifically /run/current-system/sw/bin/zsh), all commands fail.
Steps to Reproduce
Run Cursor on NixOS and have an agent try to run commands in the sandbox.
Operating System
Linux
Version Information
Version: 3.1.15
VSCode Version: 1.105.1
Commit: 3a67af7b780e0bfc8d32aefa96b8ff1cb8817f80
Date: 2026-04-15T01:46:06.515Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Linux x64 6.12.82
Additional Information
As far as I can tell, the /run rebuild correctly remounts /run/wrappers, so it’s probably just a matter of adding the mount of /run/current-system or /run/current-system/sw to the list - maybe based on presence of corresponding entries in $PATH or in the $SHELL environment variable.
Does this stop you from using Cursor
Yes - Cursor is unusable