Linux: sudo fails in manually opened integrated terminal ("no new privileges")

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Running any command with sudo in the integrated terminal fails with:
sudo: The "no new privileges" flag is set, which prevents sudo from running as root.
The same command works in an external terminal (e.g. gnome-terminal) on the same machine.

Steps to Reproduce

  1. Open Cursor on Linux.
  2. Open a new integrated terminal (user-initiated, not agent).
  3. Run sudo ls (or any sudo command).

Expected Behavior

sudo prompts for password and runs the command.

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.5.0-1027-oem

Additional Information

Ubuntu 22.04

Does this stop you from using Cursor

No - Cursor works, but with this issue

Thanks for the detailed report! This looks like it might be the same issue that’s been reported a few times upstream in VS Code. when the editor is relaunched (after an update, for example), the new process can end up with the Linux PR_SET_NO_NEW_PRIVS flag set, which then propagates into the integrated terminal and breaks sudo.

Users report that they fully quit VS Code and start it again from the shell. Any chance you could try that and see if it helps? If so, it’s almost certainly the same problem.

Relevant upstream issues:

If a clean restart doesn’t fix it for you, let us know. That would point at something different and we can dig in further!

Thanks Colin for your rapid response.

You are right. Today, after having rebooted my machine everything seems to work as expected.

I’d run “reload window” expecting it to be exactly the same as relaunching Cursor but obviously it isn’t, I’ll kept it in mind for future issues.

Thanks