Scope which paths the sandbox can touch

permissions & sandbox

// what it does

Within the sandbox, --allow-paths adds extra read/write directories, --readonly-paths adds read-only ones, and --blocked-patterns takes gitignore-style patterns to block. --network turns on sandbox network access, which is off by default. These narrow exactly what an unattended run can reach on disk and over the wire.

// shell

$ cursor-agent -p "refactor the module" --allow-paths "src,tests" --readonly-paths "config" --blocked-patterns "*.env"
$ cursor-agent -p "fetch the latest schema" --network

// resources