Sandbox + workspaceAccess: "rw" + user: "0:0" crashes gateway
I'm running a multi-agent setup with Docker sandboxes. Sandboxed agents need full root exec inside their containers (install packages, run tools, etc). Config:
"mode": "all",
"workspaceAccess": "rw",
"docker": {
"user": "0:0",
"network": "bridge"
}
}```
The problem: When the sandbox agent writes files (e.g. daily memory logs), they're created as root:root 0600 on the host via the bind-mounted workspace. The gateway (uid 1000) then tries to watch these files and crashes:
```[openclaw] Unhandled promise rejection: Error: EACCES: permission denied,
watch '/home/server/.openclaw/workspace-discord-coding-sandbox/memory/2026-04-14.md'
at createFsWatchInstance (chokidar/handler.js:126:16)
at setFsWatchListener (chokidar/handler.js:171:19)
at NodeFsHandler._watchWithNodeFs (chokidar/handler.js:327:22)```
Also hits on read:
```[tools] read failed: EACCES: permission denied,
open '/home/server/.openclaw/workspace-discord-coding-sandbox/memory/2026-04-14.md'```
My sandbox config:
``` "id": "discord-coding-sandbox",
"sandbox": {
"mode": "all",
"workspaceAccess": "rw",
"scope": "agent",
"docker": {
"user": "0:0",
"setupCommand": "pip3 install --break-system-packages yt-dlp",
"dangerouslyAllowExternalBindSources": true
}
},
Questions:
Is there a recommended way to run sandboxed agents with full root exec + workspaceAccess: "rw" without this issue? My goal is to have an agent in sandbox docker that has full access to install packages, tools etc, read/write it's own workspace files. How can I achieve that?