Run a coding agent in a microVM before enabling YOLO mode BoxLite, an Apache-2.0 open-source embedded microVM runtime, lets developers run coding agents such as Claude Code in hardware-isolated virtual machines instead of enabling `--dangerously-skip-permissions` (YOLO mode) on the host. BoxLite boots each Box through a `boxlite-shim` child process using `libkrun` on macOS `Hypervisor.framework` (Apple Silicon macOS 12 and later) or Linux KVM, backed by a host-side OS jailer, an `allow_net` egress allowlist, and a host-side `Secret` proxy, with no Docker daemon, no root privileges, and about a dozen lines of Python. The project targets indirect prompt injection hidden in `CLAUDE.md`, `AGENTS.md`, READMEs, code comments, error logs, or dependencies, and agent "Escape to Complete" behavior, so a destructive command is contained to a microVM disk that can be discarded while host files and keys stay intact. Running Claude Code without --dangerously-skip-permissions interrupts every step with approval prompts. Turning it on hands a coding agent your host shell. Permission hooks and plain Docker leave gaps because indirect prompt injections can hide inside CLAUDE.md or error logs, and standard containers share your host kernel. BoxLite embeds a microVM runtime as a library using libkrun on macOS Hypervisor.framework or Linux KVM, paired with a host-side OS jailer, an allow net egress allowlist, and a host-side Secret proxy. No Docker daemon, about a dozen lines of Python. If the agent runs something destructive, you throw away the microVM and keep the rest of your host files and keys intact. Local coding agents like Claude Code and OpenClaw force a tradeoff. Leave auto-approval off, and every test run or config edit stops for confirmation. Turn on --dangerously-skip-permissions YOLO mode , and the agent gets a host shell. Work moves faster, and every mistake hits your local machine. Real incidents go beyond accidental file deletion. As context degrades over a long session, an agent can mishandle path expansion and turn a cleanup command into rm -rf ~/ or wipe an uncommitted Git stash. Indirect prompt injection is harder to spot. When you clone an external repo and ask an agent to debug it, hostile instructions can sit inside CLAUDE.md , AGENTS.md , a README, code comments, error logs, or third-party dependencies. Security debates around OpenClaw point to the same root cause. When a long-running agent gateway holds read and write access to the host filesystem, reading ~/.ssh , .env , or cloud credentials takes one ordinary command. When a soft sandbox blocks a diagnostic command, agents also show "Escape to Complete" behavior: they look for alternate commands to bypass or disable the restriction so they can finish the task. Many teams start with tool-call hooks like PreToolUse or a permissions.deny denylist. Those checks run in the same user environment as the agent. As long as the agent can run Python, Node, or any compiled binary, it can bypass string-based matching, read .env from a script, and send the contents over the network. Another common setup puts the agent in a standard Docker container. Containers separate the filesystem view, while sharing one Linux kernel with the host. Untrusted generated code still carries a kernel-escape risk. On macOS, Docker also needs the background Docker Desktop VM, which eats memory and adds licensing costs. Passing real API keys as container environment variables exposes them inside the container. If a prompt injection triggers there, one printenv command can leak every key. BoxLite is an Apache-2.0 open-source embedded microVM runtime. You embed it in your application as a library, with no Docker daemon and no root privileges. It runs standard Open Container Initiative OCI images and puts four hard boundaries around coding agents. Hardware virtualization handles kernel isolation. BoxLite spawns an isolated boxlite-shim child process through ShimController , which calls libkrun to boot a microVM. It uses Hypervisor.framework on Apple Silicon macOS 12 and later and KVM /dev/kvm on Linux and WSL2. Each Box runs its own guest kernel. Even if an agent runs rm -rf / inside the Box, the damage stops at that microVM's disk and never touches the rest of the host filesystem. A host-side OS jailer backs up the VM layer. If a bug breaks out of the microVM, the jailer limits what host resources boxlite-shim can reach. On Linux, it combines mount, PID, and network namespaces, chroot or pivot root , Seccomp BPF syscall filtering, dropping to an unprivileged user, and cgroups v2 limits. On macOS, it loads a Seatbelt SBPL profile through /usr/bin/sandbox-exec starting from deny default , applies rlimits , and separates AF UNIX control-plane socket permissions from IP network permissions. An egress allowlist locks down outbound traffic. With NetworkSpec mode="enabled", allow net= ... , BoxLite resolves only allowlisted hostnames and sinkholes every other DNS lookup to 0.0.0.0 . To stop an agent from connecting to raw IP addresses to bypass DNS checks, BoxLite inspects TLS SNI and HTTP Host headers on TCP connections. When allow net contains only hostnames, it also blocks all outbound UDP traffic. For offline tasks, NetworkSpec mode="disabled" removes the virtual network interface completely. A host-side secret proxy keeps real credentials out of the guest. When you configure Secret name, value, hosts , the real key stays on the host. Code inside the guest sees only a placeholder, which defaults to