Verifying the sandbox on macOS and Windows
The sandbox is unit-tested on every platform, and these scripts check a real machine end to end. Results so far:
| Platform | Runtime | Result |
|---|---|---|
| Linux | containerd 2.3.6, nerdctl 2.1.6 | all checks pass |
Linux, MOB_SANDBOX_ISOLATION=gvisor |
the same, with runsc release-20261005.0 | all checks pass |
| macOS 27.0.1, Apple silicon | Apple container 1.5.0 | all checks pass |
| Windows 11 (10.0.26100) | WSL 2.9.3 containers (wslc) |
all checks pass |
Each script builds mob from the
checkout, then checks the following and prints PASS/FAIL per check:
| Check | What it proves |
|---|---|
container status |
the runtime CLI is found and its service answers |
container pull |
image pull works; a FAIL with 429 is the registry rate limit, not Mob |
| env, bind mount, workdir | -e, -v SRC:DST, -w are accepted, from a path containing a space |
| writes reach the host | the bind mount is read-write |
| exit status | a container’s exit code comes back |
stdin with -i |
piped input reaches the container |
--network none, --cpus 1, --memory 256m |
the limits take effect: only lo, one CPU’s quota (or one VM CPU), 256 MiB of memory |
| tool runs without approval | mob serve --demo offers the sandbox tool and runs it in /workspace |
| workspace persists, the rest is discarded | only /workspace survives between calls |
| workspace on the host | it is data_dir/sandbox/<conversation> |
| nonzero exit, output capped | the tool reports exitCode and truncated |
| limits apply | sandbox.network, cpus and memory reach the tool’s containers |
| stop removes the container | --name plus the runtime’s force-remove work |
runs under gVisor (with MOB_SANDBOX_ISOLATION=gvisor) |
dmesg in the container reports gVisor, through the CLI and the tool |
A failed run keeps its work directory (config, serve.log, workspaces) and
prints its path.
Requirements: Apple silicon, macOS 26, Bun, Git.
-
Install Apple’s runtime from the signed
.pkgon the releases page, then start it:Terminal window container system start # accept the default kernel when askedcontainer system statuscontainer run --rm alpine:3.20 echo ok -
Run the check from the checkout:
Terminal window git clone https://github.com/fdkevin0/mob && cd mobscripts/verify-sandbox.sh -
Also try the real data directory, whose path contains a space (
~/Library/Application Support/mob): add thesandbox:section fromconfig.example.yamlwithenabled: true, runbuild/mob serve --demo(bun run build:clifirst), and in the web UI send/sandbox uname -a; pwd; ls /Users.
Windows
Section titled “Windows”Requirements: Windows 11 with virtualization enabled, a WSL release that includes WSL containers, Bun, Git.
-
Install or update WSL with containers, then check
wslc:Terminal window wsl --update --pre-release # if wslc is not yet in the stable releasewsl --versionwslc run --rm alpine:3.20 echo ok -
Run the check from the checkout (PowerShell; Windows PowerShell 5.1 or 7):
Terminal window git clone https://github.com/fdkevin0/mob; cd mobpowershell -ExecutionPolicy Bypass -File scripts\verify-sandbox.ps1 -
Repeat with your normal user profile path (
%LOCALAPPDATA%\mobby default), as in step 3 for macOS, and send/sandbox ls /mnt/c— it must fail.
Linux with gVisor
Section titled “Linux with gVisor”Requirements: containerd with nerdctl and CNI plugins, and runsc from
gVisor’s install guide on
containerd’s PATH.
runsc --versionsudo nerdctl run --rm --runtime runsc alpine:3.20 dmesg # prints "Starting gVisor..."MOB_SANDBOX_ISOLATION=gvisor scripts/verify-sandbox.shWhat to send back
Section titled “What to send back”The script’s full output, plus for any FAIL:
- the runtime’s version (
container --versionorwsl --version); serve.logfrom the kept work directory;- the output of the failing step run by hand, with
--helpfor that subcommand (container run --help,wslc run --help,wslc rm --help), since the flags Mob uses are taken from documentation that may lag the CLI.