@@ -22,6 +22,7 @@ workspace sync mode.
2222- ` openshell ` CLI on ` PATH ` (or a custom path via
2323 ` plugins.entries.openshell.config.command ` )
2424- OpenSSH client available on the Gateway host
25+ - OpenShell ` v0.0.88 ` or newer when configuring an OpenShell workspace
2526- An OpenShell account with sandbox access
2627- OpenClaw Gateway running on the host
2728
@@ -69,6 +70,15 @@ openclaw sandbox explain
6970
7071This is the most important OpenShell decision.
7172
73+ OpenShell also has a control-plane resource named a ** workspace** . That is
74+ separate from the filesystem workspace described below: it scopes sandboxes,
75+ providers, policies, inference routes, and membership. Set
76+ ` plugins.entries.openshell.config.workspace ` to use an existing non-default
77+ OpenShell workspace. The plugin does not create OpenShell workspaces or manage
78+ their membership. When this setting is unset, the plugin preserves the
79+ OpenShell CLI's ambient ` OPENSHELL_WORKSPACE ` selection, or the CLI's ` default `
80+ fallback when no ambient selection exists.
81+
7282### mirror (default)
7383
7484` plugins.entries.openshell.config.mode: "mirror" ` keeps the ** local workspace
@@ -124,6 +134,7 @@ All OpenShell config lives under `plugins.entries.openshell.config`:
124134| ` from ` | ` string ` | ` "openclaw" ` | Sandbox source for first-time create |
125135| ` gateway ` | ` string ` | unset | OpenShell gateway name (top-level ` --gateway ` ) |
126136| ` gatewayEndpoint ` | ` string ` | unset | OpenShell gateway endpoint (top-level ` --gateway-endpoint ` ) |
137+ | ` workspace ` | ` string ` | unset | Existing OpenShell control-plane workspace used for every CLI operation |
127138| ` policy ` | ` string ` | unset | OpenShell policy ID for sandbox creation |
128139| ` providers ` | ` string[] ` | ` [] ` | Provider names attached at sandbox creation (deduped, one ` --provider ` flag per entry) |
129140| ` gpu ` | ` boolean ` | ` false ` | Request GPU resources (` --gpu ` ) |
@@ -136,6 +147,19 @@ All OpenShell config lives under `plugins.entries.openshell.config`:
136147stay under the managed roots ` /sandbox ` or ` /agent ` ; other absolute paths are
137148rejected.
138149
150+ ` workspace ` must match OpenShell's current workspace-name contract: 1-19
151+ lowercase alphanumeric characters or single hyphens, with no leading,
152+ trailing, or consecutive hyphen. Create it first with
153+ ` openshell workspace create --name <name> ` . OpenShell rejects sandbox
154+ operations when the selected workspace does not exist or is being deleted.
155+ Set it to ` "default" ` to override an ambient non-default Workspace explicitly.
156+
157+ The setting applies to every OpenShell sandbox managed by this plugin instance;
158+ it cannot select different OpenShell workspaces per OpenClaw agent or session.
159+ Changing it does not migrate existing sandboxes. Delete OpenClaw's OpenShell
160+ sandboxes while the old workspace is still configured, then change the setting
161+ and restart the Gateway.
162+
139163Sandbox-level settings (` mode ` , ` scope ` , ` workspaceAccess ` ) live under
140164` agents.defaults.sandbox ` like any backend. See
141165[ Sandboxing] ( /gateway/sandboxing ) for the full matrix.
@@ -228,6 +252,7 @@ Sandbox-level settings (`mode`, `scope`, `workspaceAccess`) live under
228252 mode: " remote" ,
229253 gateway: " lab" ,
230254 gatewayEndpoint: " https://lab.example" ,
255+ workspace: " research" ,
231256 policy: " strict" ,
232257 },
233258 },
@@ -303,6 +328,8 @@ filesystem must permit the writes. `sandbox.docker.network`,
303328## Current limitations
304329
305330- Sandbox browser is not supported on the OpenShell backend.
331+ - One plugin instance uses one OpenShell workspace; per-agent or per-session
332+ OpenShell workspace selection is not supported.
306333- ` sandbox.docker.binds ` does not apply to OpenShell; sandbox creation fails
307334 if binds are configured.
308335- Docker-specific runtime knobs under ` sandbox.docker.* ` (other than ` env ` )
@@ -313,8 +340,9 @@ filesystem must permit the writes. `sandbox.docker.network`,
313340
314341## How it works
315342
316- 1 . OpenClaw runs ` sandbox get ` for the sandbox name (with any configured
317- ` --gateway ` /` --gateway-endpoint ` ); if that fails it creates one with
343+ 1 . OpenClaw runs ` sandbox get ` for the sandbox name (with the selected
344+ OpenShell workspace and any configured ` --gateway ` /` --gateway-endpoint ` ); if
345+ that fails it creates one in the same OpenShell workspace with
318346 ` sandbox create ` , passing ` --name ` , ` --from ` , ` --policy ` when set, ` --gpu `
319347 when enabled, ` --auto-providers ` /` --no-auto-providers ` , and one
320348 ` --provider ` flag per configured provider.
0 commit comments