Command reference ยท Cursor CLI
/sandbox
Configures sandbox mode and network access via an interactive menu.
/sandbox opens a menu to configure sandbox mode and network access settings. Sandbox policy files (~/.cursor/sandbox.json, .cursor/sandbox.json) are honored, including over SSH; a default-deny network proxy applies to sandboxed commands.
โ WHEN TO USE IT?
Restrict write access while trusting an unfamiliar repo
/sandbox โ enable before the agent works on a foreign project
Allow network access specifically for one task
/sandbox โ adjust the network mode before a package install
โ WHEN NOT TO?
A single command should run isolated with its own path rules, not the whole session
/sandbox sets the policy for the running session, not for a one-off command.
Better: Use agent sandbox run --allow-paths <paths> for a single command
Everything should just run without any prompts at all
Sandbox deliberately restricts, which conflicts with a fully autonomous run.
Better: Use --yolo or /run-everything
SOURCES
- Cursor Docs โ Slash Commands โ cursor.com