Skip to content

feat!: openclaw-style sandboxMode — per-agent sandbox policy - #43

Merged
melvincarvalho merged 1 commit into
gh-pagesfrom
issue-42-sandbox-mode
Jun 11, 2026
Merged

melvincarvalho merged 1 commit into
gh-pagesfrom
issue-42-sandbox-mode

Conversation

@melvincarvalho

Copy link
Copy Markdown
Contributor

Fixes #42

  • sandboxMode: 'auto' | 'all' | 'non-main' | 'off' (default auto: sandbox when the container engine actually responds — Docker quickstart unchanged, engine-less machines just work)
  • Per-agent AgentConfig.sandbox: true/false overrides the global mode — openclaw's most useful pattern: trusted main on the host, workers contained
  • containerRuntime is engine-only again (docker/podman/container); the short-lived 'local' value from Built-in 'local' runtime: run agents as plain processes, no container engine #38 throws a migration error pointing at sandboxMode: 'off'
  • Orphan reaping now sweeps both worlds: local pidfiles always, engine containers when sandboxing is possible
  • npx jsclaw onboard asks the sandbox question (engine detected → choose all/non-main/off, default all; no engine → off with the no-isolation warning) and prompts for localRunner when any agent can run unsandboxed
  • README: Sandboxing section with the posture table (nanoclaw all ↔ openclaw off) and the standing warning

Tests: 124/124 (new resolveSandbox coverage: modes, isMain, per-agent override, auto fallback with a missing engine, migration + validation errors). Verified live: the resident instance migrated from containerRuntime: 'local' to sandboxMode: 'off' and the agent responded over the new path.

)

sandboxMode: 'auto' (default — sandbox when the engine responds) |
'all' | 'non-main' | 'off'; per-agent AgentConfig.sandbox override.
containerRuntime is engine-only again ('local' value gets a migration
error). Orphan reaping sweeps both pidfiles and containers. Onboard
wizard asks the sandbox question with the no-isolation warning.
@melvincarvalho
melvincarvalho merged commit a31eba7 into gh-pages Jun 11, 2026
@melvincarvalho
melvincarvalho deleted the issue-42-sandbox-mode branch June 11, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align runtime posture with openclaw: process-first default, sandbox as opt-in

1 participant