Configuration option to run terminal commands as a different profile

Top-level ask: It would be good if Cursor could be configured to use a different user for the shell commands it runs, rather than the current user. That way you could prevent quite a lot of disaster scenarios (such as the dreaded sudo rm -rf / and other mis-use of privileges).

One option: re-use ‘terminal profiles’ from VSCode and let the user select a profile in Cursor Settings > Features > Terminal.

For example, I could add this to my settings.json:

  "terminal.integrated.profiles.linux": {
    "cursor-agent": {
      "path": "sudo",
      "args": [
        "-u",
        "cursor-agent",
        "-i"
      ],
    }
  }

And then I could select that profile in Cursor settings. I could create that user so that it cannot sudo and it doesn’t have access to things like my git credentials or any other super-user privileges that I have on my system.

I am assuming that there are similar options for windows and MacOS, making this a useful cross-platform feature.

Indeed this could be brilliant for being able to set Cursor Agent up with entirely separate credentials for things like GitLab and GitHub and whatnot so that it cannot perform destructive actions like force-pushes.

1 Like

Plus many many.

This would be a huge improvement. I want Cursor to have a less privileged user, and I see a strong correlation between zsh users (many with oh-my-zsh) and wonky terminal controls.