Why Does Modal Snapshot Sandboxes?
Erik Bernhardsson · Vibhu Sapra
Erik Bernhardsson sees snapshotting as the way a long-running agent spins a sandbox up in 100 milliseconds, runs a few commands, shuts it down, and snapshots it. A faster wake-up and go-to-sleep cycle means sandboxes only run for a very brief period. Compute gets much more efficient, and forking, moving work around, branching instead of a linear flow, and running hundreds of agents at the same time become possible.
A lot of sandbox workloads today are lift and shift. People take a dev box, shove it in the cloud, and have an agent control it, sometimes with the harness running inside the sandbox. He is not sure a long-running dev box is the right long-term model for agent compute. A better model treats agents as durable execution workflows that run nonstop and only sometimes run commands.
Continuous integration shows the same limit. For most of its history, including GitHub Actions, the flow was sequential: slowly install a bunch of stuff, run the test suite, then generate reports. Breaking a suite into shards is possible and annoying. The aim is to run every single test in its own sandbox, about a thousand sandboxes at once. Too much overhead around starting and stopping sandboxes is what blocks that scale. Frictionless starting and stopping is what opens an extremely bursty, large-scale run where as much work as you want can run in parallel. Once the primitives and building blocks are in place, software can do work that previously could not be done.
Why AI Compute Comes in Rectangles — Erik Bernhardsson, Modal CEO ·
From the transcript
Very short lived, maybe one per command, like things like that. So I think there's a lot of cool stuff there. We've already spent a lot of time doing that, you know, around snapshots. But I think there's a lot of cool stuff to be to be built there as well. You brought up snapshotting a couple times, like, what do you see as like the use case for snapshotting? Like, what would that give us that we don't get right now? I think the big thing for me is like today, a lot of sandbox workloads are kind of like lift and shift.
Like people think a lot about sandboxes almost like, you know, I have my dev box. Now I'm going to shove it in the cloud. I'm going to have an agent control it. Maybe I'll run the harness inside the sandbox. I don't know if like long-term that's like the right way to think about, you know, on like compute for agents. I think... A much better model would be, you're going to have this like very long running agents, which almost like to me are like kind of durable execution workflows.