You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1212d3e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/cli/sandbox.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,8 @@ For `ssh` and OpenShell `remote`, recreate matters more than with Docker: the re
47
47
48
48
Inspect the effective sandbox mode/scope/workspace access, sandbox tool policy, and elevated-tool gates (with fix-it config key paths).
49
49
50
+
For `mode: "needed"`, the report distinguishes the direct chat runtime from the sandbox that activates only when a sandbox-bound tool runs.
51
+
50
52
The report keeps `workspaceRoot` as the configured sandbox root and separately shows the effective host workspace, backend runtime workdir, and Docker mount table. For `workspaceAccess: "rw"`, the effective host workspace is the agent workspace rather than a directory below `workspaceRoot`.
51
53
52
54
```bash
@@ -99,7 +101,7 @@ Sandbox settings live in `~/.openclaw/openclaw.json` under `agents.defaults.sand
Copy file name to clipboardExpand all lines: docs/gateway/sandbox-vs-tool-policy-vs-elevated.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ openclaw sandbox explain --json
25
25
It prints:
26
26
27
27
- effective sandbox mode/scope/workspace access
28
-
- whether the session is currently sandboxed (main vs non-main)
28
+
- whether the session is currently sandboxed, or will sandbox only when sandbox-bound tools run
29
29
- effective sandbox tool allow/deny (and whether it came from agent/global/default)
30
30
- elevated gates and fix-it key paths
31
31
@@ -35,6 +35,7 @@ Sandboxing is controlled by `agents.defaults.sandbox.mode`:
35
35
36
36
-`"off"`: everything runs on the host.
37
37
-`"non-main"`: only non-main sessions are sandboxed (common "surprise" for groups/channels).
38
+
-`"needed"`: chat-only turns run direct; sandbox-bound tools such as `exec` start the sandbox when called and fail closed if the backend is unavailable.
38
39
-`"all"`: everything is sandboxed.
39
40
40
41
`agents.defaults.sandbox.workspaceAccess` controls what the sandbox can see: `"none"`, `"ro"`, or `"rw"`.
-`non-main`: sandbox every session except the agent's main session. The main session key is always `agent:<agentId>:main` (or `global` when `session.scope` is `"global"`); it is not configurable. Group/channel sessions use their own keys, so they always count as non-main and get sandboxed.
39
+
-`needed`: chat-only turns run direct. Sandbox-bound OpenClaw tools such as `exec` start the configured backend when called and fail closed if it is unavailable. Codex native execution stays disabled until an OpenClaw sandbox environment exists, so it cannot fall back to host execution.
39
40
-`all`: every session runs in a sandbox.
40
41
41
42
**Scope** controls how many containers/environments are created:
0 commit comments