Sandbox on Linux does not have proper env setup

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Several errors on the agent running commands:

  1. Error: Failed to apply sandbox: IO error: Step 0/7 (pre-discovery) failed: IO error: ripgrep failed with exit code: Some(2)

I have ripgrep installed (Debian 13, latest version of ripgrep)

  1. –: line 1: mm: command not found
    –: line 1: dump_bash_state: command not found

mm is defined in .bashrc by importing all my definitions:

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

I don’t know what dump_bash_state is.

Steps to Reproduce

ask any model to run my custom alias mm or any other cmd defined in .bashrc

Expected Behavior

it used to work normally in Cursor 2.1

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.14
VSCode Version: 1.105.1
Commit: 1685afce45886aa5579025ac7e077fc3d4369c50
Date: 2025-12-11T01:12:35.790Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Linux x64 6.12.57+deb13-amd64

For AI issues: add Request ID with privacy disabled

005e86bc-b60c-41de-b49e-5fce2a2e89a1

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report.

Per the docs, sandbox is officially supported only on macOS right now, and Linux support is still in progress. It looks like in 2.2.14 the sandbox partially enabled on Linux, which causes:

  • the pre-discovery step with ripgrep to fail
  • your aliases from .bashrc not to load
  • dump_bash_state: command not found to appear

As a workaround, you can try:

  1. Go to Settings → Cursor Settings → Agents → Auto-Run
  2. Set Auto-Run Mode to Ask Every Time or Run Everything (so commands run without sandbox)
  3. Restart Cursor and check if your mm works via the agent and in the integrated terminal

Could you also share:

  • A screenshot or full error text showing Failed to apply sandbox... and dump_bash_state
  • Your current Auto-Run Mode from settings
  • Confirmation that rg --version and mm work in Cursor’s integrated terminal when run manually

I’ll pass this to the team to fix sandbox behavior on Linux. Let me know if the Auto-Run workaround helps.

from: 6975863d-09a5-4d82-a290-6ecc463c9201

and

my current Auto-Run Mode from settings is Use Allowlist

normal run of cmds:

I confirm your fix works - when Auto-Run Mode is “Run Everything”:

in: 9902d453-66f3-4bb7-8260-fae79187ae53