Sandbox troubleshooting
Fix OpenShell sandbox problems on Linux and macOS, from setup and the OpenShell gateway to runs, MicroVM disks and telemetry, starting with sandbox doctor.
Start with the doctor. Every failed check names its fix on the next line (→ …).
defenseclaw sandbox doctorIt checks the platform, your user, Landlock, Docker, systemd linger (the login session on a Mac), the OpenShell service, CLI, registration, mTLS files, version and driver, bind mounts, telemetry, the sandbox ports, the daemon, the hooks, the harness images, the shell wrappers, your organization's policy and sandbox TLS trust. defenseclaw doctor shows the same checks in its Sandbox section.
| Doctor | What it does |
|---|---|
--fix | Applies the fixes that need only your user (starting or restarting the gateway, turning bind mounts on), after asking. It does not install OpenShell. |
--json | Prints the report with ok (every check passed) and ready (sandboxes are also turned on, and defenseclaw sandbox run does not refuse this machine). |
| Exit status | 1 when a check fails. The last line reads ✗ not ready for sandboxes: N checks failed. |
The last line reads not ready for sandboxes yet while openshell.enabled is false. On a Mac whose gateway runs the Docker driver, it also reads that when Docker Desktop's Linux VM has no usable Landlock or could not be checked. The exit statuses of sandbox run and pull are on the sandbox guide.
Find your problem
- Setup and the gateway: sandboxes are off, OpenShell missing, too old or installed another way, the gateway answers wrong or is down.
- OpenShell upgrades: what an upgrade does to running sandboxes, and sandboxes from an OpenShell older than 0.1.6.
- Runs and sessions: blocked tool calls, tamper alerts, rejected keys, error states, refused folders.
- MicroVM work and stops: a stop held for a disk sync, sign-out, contained VMs.
- Disk and telemetry: low disk, MicroVM disks, red telemetry rows.
- Linux: Landlock, rootless Docker, docker group, image builds, live-mounted folders.
- macOS: Docker Desktop, Homebrew, MicroVM driver, first run.
- Network: a site is unreachable, git or npm over SSH, TLS-inspecting proxies, the ssh wrapper.
Two problems come up most:
- Every tool call is blocked. The sandbox hooks fail closed when they cannot reach DefenseClaw. Start the daemon with
defenseclaw-gateway start(details). - A tool cannot reach a site. The egress proxy blocked it. Look for the block in
defenseclaw sandbox activity(details).
Setup and the gateway
OpenShell upgrades
An OpenShell upgrade, and any gateway restart, affects every sandbox on the gateway, of every owner. Setup names the running ones first.
Runs and sessions
These problems appear while a sandbox runs or when you pull its work back.
Save first
Before following a stop step below, save or sync accessible guest work. On a copy-mode MicroVM, run defenseclaw sandbox pull NAME --apply (or --branch or --patch-out FILE) for work you need on the host. Confirm the project, branch or patch file contains it before using defenseclaw sandbox stop NAME, which requests a disk sync before stopping a running MicroVM. A failed sync can lose changes since the last successful one.
MicroVM work and stops
The MicroVM driver is a Preview. A MicroVM keeps its work on its own disk, which must be synced before the VM stops. These entries say what DefenseClaw does when that sync cannot happen.
Disk and telemetry
Related
- Sandbox guide
- Sandbox network: the decision order and what each block category means.
- A tool cannot reach a site: git over SSH and databases.
Sandboxes in the TUI and macOS app
Watch and manage OpenShell sandboxes from the DefenseClaw TUI Sandboxes panel or the macOS app's Sandboxes view and menu bar, and run setup from either.
Set up sandboxes with an AI agent
A runbook an AI agent follows to set up OpenShell sandboxes, run one agent in a sandbox and report what it saw, with the hard rules it must keep.