promptgarten ๐ŸŒฑ

Command reference ยท Cursor CLI

agent sandbox disable

Disables sandbox mode and falls back to allowlist mode instead.

agent sandbox disable is a subcommand of agent sandbox and permanently turns off sandbox mode. The CLI then falls back to allowlist mode: individual actions such as shell commands, file access, web fetches, or MCP tools are allowed or denied via permission tokens (e.g. Shell(git), Read(src/**), WebFetch(*.example.com), Mcp(server:tool)) in the project or global configuration, instead of running isolated automatically; according to the reference, deny rules take precedence over allow rules. The global option --sandbox disabled is equivalent. According to the official CLI overview, the setting persists across sessions, including over SSH. This should be distinguished from agent sandbox run <cmd> --network, which only allows network access within the sandbox for a single command, without disabling the sandbox altogether. For interactive fine-tuning between the three modes Run Everything, Auto-Run in Sandbox, and Ask Every Time, the slash command /sandbox is used instead.

โœ… WHEN TO USE IT?

Sandbox restrictions (e.g. no network) permanently interfere with a specific workflow

agent sandbox disable

Fine-grained control over individual commands and paths via an allowlist is wanted, instead of blanket isolation

agent sandbox disable, then set permission tokens like Shell(git) or Read(src/**) in the configuration

โ›” WHEN NOT TO?

Network access is only needed for a single sandbox run

agent sandbox disable turns off the sandbox completely instead of just allowing network access.

Better: use agent sandbox run <cmd> --network to allow network access for a single run specifically

The sandbox shouldn't be permanently disabled, only adjusted temporarily

agent sandbox disable permanently changes the persistent configuration for all future sessions.

Better: use /sandbox to adjust mode and network access interactively, without disabling the sandbox completely

SOURCES

MORE COMMANDS ยท Cursor CLI

agent sandbox resetagent sandbox run <cmd> [args...]agent sandbox help [command]agent worker startagent worker debugagent worker help [command]agent bedrockGlobal Options (Flags)/opus/composer/fast/model

All commands ยท Cursor CLI โ†’

Share:๐•in๐Ÿ’ฌ