experiment

Claude Web sandbox: rebuilt from scratch

livereverse-engineeringfrom-scratch

Reverse-engineered how Claude's web sandbox works and rebuilt it from the ground up.

Curiosity-driven teardown. Figured out the moving parts, then re-implemented them myself to actually understand the design.

hypervisor
Firecracker
boot
custom kernel + initrd
docs
4 guides

Why rebuild it

Claude's web sandbox is one of those systems that looks simple until you open the hood. Rather than read about how it works, I took it apart and rebuilt the moving parts myself. The point was never to clone a product; it was to understand the design decisions by feeling them.

Architecture

At the core sits a Firecracker microVM: a minimal kernel and a custom initrd, launched through the Firecracker API socket. A TAP device gives the guest network egress, and a WebSocket control plane bridges the browser to the serial console. Every piece is a small shell script you can read in one sitting.

Pieces worth knowing

The kernel and VM config live in sandbox/kernel/microvm.config and sandbox/firecracker/vm-config.json. setup-tap.sh brings up the network, build-initrd.sh assembles the ramdisk, and launch.sh ties everything together. Serial output lands in /tmp/fusebox-serial.log, and the WebSocket protocol is documented in websocket.md.

The fastest way to understand a system is to build it again.

What it taught me

Boot chains, network namespaces, and the Firecracker API stop being mysterious once you have launched your own microVM from scratch. The debugging notes in troubleshooting.md are the best proof: every odd behavior got a root cause written down next to it.