wraptool vs. Docker Sandboxes

How wraptool’s capability mediation relates to Docker Sandboxes’ microVM isolation — different threat models that compose, and how wraptool runs its harness inside a Docker Sandbox on its own terms.

Docker Sandboxes (docker sandbox run / sbx) targets the same headline use-case as wraptool: run an AI coding agent without handing it your machine and your credentials. The two answer different questions, and understanding the difference is the best way to understand what wraptool is for. They also compose in practice: wraptool up --runtime=sbx runs the harness inside a Docker Sandbox while wraptool keeps mediating the privileged operations (see wraptool inside a Docker Sandbox below).

Note

Docker Sandboxes is an experimental preview as of mid-2026, and wraptool’s Docker Sandboxes runtime is experimental with it; details below may change as the product matures.

Two threat models

Docker Sandboxes is environment isolation. The agent runs free inside a disposable microVM: only the project workspace is mounted, network access is configurable, and secrets live in the OS keychain behind a proxy — the agent sees a sentinel value in the environment and the proxy injects the real credential at the boundary. The safety claim is about blast radius: unattended “YOLO mode” is acceptable because the damage is confined to the box.

wraptool is capability mediation. The agent never touches host credentials — SSH keys, gcloud, kubeconfig, cloud service-account files — in any form, proxied or otherwise; it only holds the MCP bearer token needed to reach wraptool itself (see Security model). Privileged operations go through MCP tools policed per subcommand and per flag (deny > allow > constraints), executed as argv arrays with no shell, with output passed through heuristic key-name/value-shape scrubbing (not a boundary; see Credential scrubbing) and every call audited. New capabilities are granted through an operator approve/deny workflow, not a static configuration. The box the harness runs in — a Guix container, a Dev Container, or a Docker Sandbox — is wraptool’s second layer, not the whole story.

The concrete consequence: an agent granted git-push through a credential proxy can push anything, anywhere that credential reaches — --force, a wrong remote, remote set-url followed by a push. wraptool’s policy can allow git push while denying --force and remote set-url specifically. Inversely, a microVM is a harder boundary than the namespaces and containers wraptool uses: container escapes via the shared kernel are a real vulnerability class, microVM escapes are much rarer.

Isolation alone does not stop a confused-deputy agent from misusing credentials it was legitimately given — that gap is exactly what per-operation policy, output scrubbing, and the audit trail fill.

Side by side

Docker Sandboxes wraptool
Boundary strength microVM (hard) user/mount namespaces or container (shared kernel); the microVM itself with --runtime=sbx
Credential model proxied — agent uses credentials, scoped by the proxy mediated — agent requests operations, never holds host credentials (only the MCP token to reach wraptool)
Policy granularity filesystem, network, secrets on/off per-subcommand, per-flag, value constraints
Audit enterprise tier (Docker AI Governance) built-in append-only event log + review UI, self-hosted
Approval workflow none — grants are static capability request → operator review → config merge
Agent supply chain installs whatever the agent’s installer ships version-locked harness pool: quarantine windows, receipts, rollback
Toolchain reproducibility image-dependent same Guix manifest inside and outside the container
Setup cost near zero-config config authoring and policy curation
Unattended multi-agent first-class goal per-project wraptool up, shared server; not the focus
Vendor coupling Docker stack; governance is commercial none — works with any forge, fully self-hosted

They compose

The approaches are complementary rather than competing. Sandboxes answers “how much damage can the agent do to my machine?” — the box. wraptool answers “what can the agent do with my authority?” — exactly the policy. wraptool’s Docker Sandboxes runtime is that composition made concrete: the harness runs inside the microVM, and wraptool keeps mediating the privileged operations from the host. The policy, audit, and harness-pool supply-chain layers have no counterpart in the isolation-only model, and the microVM boundary has no counterpart in wraptool’s other runtimes.

If your concern is a runaway agent trashing a workstation, isolation alone may be enough. If your concern includes what an agent can quietly do with your git remotes, your cloud sessions, and your cluster — or proving afterwards what it did — you need mediation, whichever box it runs in.

wraptool inside a Docker Sandbox

wraptool up --runtime=sbx is a third runtime next to Guix and Dev Containers. It uses Docker Sandboxes for what it is good at — the microVM boundary — and deliberately declines the parts of the product that would reopen the credential paths wraptool exists to close. The result is opinionated by design:

  • Explicit opt-in. --runtime=auto never selects it. The runtime needs a Docker account (sbx login), the sbx CLI sends telemetry unless SBX_NO_TELEMETRY=1 is set, and it has host-wide state that wraptool must inspect before each start. Those are decisions for you, not a fallback.
  • The harness comes from the harness pool, not from Docker. wraptool creates the sandbox with Docker’s built-in shell agent — a bare login shell with no harness preinstalled — and mounts the pool’s realized runtime/ tree read-only, exactly as the other runtimes do. The vendor agent kinds (claude, codex, …) are never used: they bring a floating harness version baked into Docker’s image, default credential bindings, and a shared skills store, none of which is version-locked or quarantined. The same generation of the same harness runs in every runtime.
  • No kits, no in-workspace authority. Mounts, environment, and network rules are passed on the sbx command line by wraptool up. wraptool never passes --kit and never reads a sandbox kit from the workspace: the workspace is agent-writable, and a kit is an authority grant.
  • Docker’s credential proxy stays out of the loop. The harness holds only the MCP bearer token, written into the harness configuration in the workspace as on every runtime; the sandbox reaches the wraptool server on the host through one sandbox-scoped network rule for localhost:<port>, and the server stays loopback-bound. up refuses to start while sbx has host MCP servers registered (a sandbox’s MCP gateway could attach them) or while ssh.agentForwardingEnabled is on (every sandbox would get your SSH agent); both refusals name the exact remedy. A global sbx secret that is not a model-provider key is injected by Docker’s proxy into the sandbox’s outbound requests, so up warns about each one on every start. The skills store is off. sbx itself runs with a minimal environment, the same principle wraptool applies to every wrapped tool.
  • The toolchain is yours to choose. What is inside the VM comes from a template image: Docker’s default for the shell agent (Ubuntu with common toolchains such as git, Node.js, Python, and Go; pulled fresh on every create, so unpinned) or any OCI image you pass with --sandbox-template (or WRAPTOOL_SANDBOX_TEMPLATE). A template decides only what is inside the box, so it is not an authority grant — but wraptool still takes it from the host side only.
  • One sandbox per worktree. The sandbox is named for the worktree, and its mounts, environment, and port rule are fixed at creation. A second up reuses it; a drift (a changed MCP port, a different harness) refuses with wraptool down --rm as the fix. wraptool down stops the sandbox, down --rm removes it, and sandbox-scoped network rules go with it.

Egress other than the wraptool pinhole is governed by your sbx network policy, not by wraptool: under the balanced preset, unknown destinations queue in sbx policy approval ls for you to allow or dismiss. That is a second, independent approval surface — environment-level, next to wraptool’s capability-level one — and the two do not yet share a UI.

Before the first wraptool up --runtime=sbx, the host needs:

sbx login                                   # sbx 0.47.0 or newer on PATH
sbx policy init balanced                    # sbx create needs a network policy
sbx settings set ssh.agentForwardingEnabled false && sbx daemon restart
wraptool harness install claude             # an active pool generation for the host platform

wraptool doctor checks the same host state before you run up: whether sbx is present, current, and signed in (env.sbx-cli), whether agent forwarding is still on (exposure.sbx-agent-forwarding), which global secrets the proxy would inject (exposure.sbx-secrets), and whether the global network policy lets a sandbox reach host loopback (exposure.sbx-policy-preset). See doctor.

The server must use mcp.transport: sse; a Unix socket cannot cross the VM boundary. The design, including every decision above and the evidence behind it, is in design/harness/docker-sandbox-runtime.md.

Back to top