Command reference ยท Cursor CLI
agent sandbox
Parent command, hidden from default help, for configuring sandbox mode or running one command in isolation.
agent sandbox groups the enable, disable, reset, and run subcommands, which configure the CLI's sandbox mode or run a single command in isolation. Per the docs, agent sandbox is 'hidden' as a top-level command and therefore doesn't show up in default help (agent help). The same configuration can also be controlled interactively via /sandbox or the --sandbox <mode> flag.
โ WHEN TO USE IT?
Turn on sandbox mode globally for all future sessions
agent sandbox enable
Test a single, potentially risky command in isolation
agent sandbox run npm install
โ WHEN NOT TO?
Sandbox mode should only apply to a single session
agent sandbox enable/disable changes a persistent setting that carries over across sessions.
Better: Set --sandbox enabled or --sandbox disabled only for that one agent call
You just want to check which sandbox mode is currently active
agent sandbox with no subcommand opens a configuration menu directly instead of just displaying status.
Better: Open /sandbox in interactive mode and view the current state there without changing anything
SOURCES
- Cursor Docs โ CLI Reference: Parameters โ cursor.com
- Cursor Docs โ CLI Overview โ cursor.com