Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
On Linux, headless Cursor CLI appears to ignore both project-level and user-level sandbox.json.
I have:
• project file: .cursor/sandbox.json
• user file: ~/.cursor/sandbox.json
Both contain:
"type": "workspace_readwrite",
"additionalReadwritePaths": [],
"additionalReadonlyPaths": [],
"disableTmpWrite": true,
"enableSharedBuildCache": false,
"networkPolicy": {
"default": "deny",
"allow": [
"<server-hostname>"
]
}
}
However, during a real headless run, the policy passed to cursorsandbox is:
{"sandbox":{"type":"workspace_readwrite","cwd":"<project-workspace>","additionalReadwritePaths":[],"networkAccess":false,"disableTmpWrite":false}}
So headless CLI is generating its own sandbox policy and not honoring the sandbox.json values.
Steps to Reproduce
- Create .cursor/sandbox.json with disableTmpWrite: true
- Run headless agent from that workspace, for example:
agent -p "Use the shell tool to run: touch /tmp/headless-sandbox-probe && echo TOUCH_OK || echo TOUCH_FAIL. Then reply exactly with DONE." \
--workspace /path/to/workspace \
--model composer-2 \
--approve-mcps \
--trust \
--sandbox enabled \
--output-format stream-json \
--stream-partial-output
- Observe that headless sandbox behavior does not reflect the configured sandbox.json
- If you capture the helper policy passed to cursorsandbox, it shows disableTmpWrite:false
Expected Behavior
If sandbox.json is supported in headless CLI, the generated helper policy should reflect it, including:
disableTmpWrite: true
enableSharedBuildCache: false
networkPolicy
Operating System
Linux
Version Information
OS: Ubuntu Linux (24.04)
Kernel: 6.8.0-88-generic
Cursor Agent version: 2026.04.08-a41fba1
Does this stop you from using Cursor
Yes. CLI is a core feature for the team currently.