<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Shan Valleru&#39;s Blog</title>
    <link>https://svalle.ru/tags/sandboxes/</link>
    <description>Technical blog by Shan Valleru covering Kubernetes, distributed systems, AI, and business strategy. Deep dives into platform engineering, agentic coding, emergence, disruption theory, and infrastructure economics.</description>
    <language>en-us</language>
    <lastBuildDate>Wed, 22 Jul 2026 23:21:14 -0700</lastBuildDate>
    <atom:link href="https://svalle.ru/tags/sandboxes/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Sandboxes Are the New Servers</title>
      <link>https://svalle.ru/posts/ai/sandboxes-are-the-new-servers/</link>
      <guid isPermaLink="true">https://svalle.ru/posts/ai/sandboxes-are-the-new-servers/</guid>
      <pubDate>Wed, 22 Jul 2026 06:00:00 &#43;0000</pubDate>
      <description>Every new cloud tenant got a new primitive: apps got VMs, microservices got containers, events got functions. AI agents are getting the sandbox. Why agents are a workload unlike anything the cloud has hosted—and why isolate, snapshot, fork is becoming a unit of compute.</description>
      <content:encoded><![CDATA[<p>Every era of the cloud got a new tenant, and every new tenant got a new primitive. Applications got the virtual machine. Microservices got the container. Events got the function. Each time, the industry didn&rsquo;t just shrink the old box—it rebuilt isolation, scheduling, and pricing around what the new tenant actually was.</p>
<p>AI agents are the new tenant. And they are a workload unlike anything the cloud has hosted: they write their own code seconds before running it, they succeed by failing fast, they want to fork running machines like processes, and increasingly they get <em>graded</em> by the substrate they run on. None of the existing primitives fit. That&rsquo;s why the sandbox—isolate, snapshot, fork—is becoming a first-class unit of compute, why <a href="/posts/ai/anatomy-of-a-vertical-ai-agent/" >the vertical AI pattern</a> has a sandbox box in it, and why there are now entire companies selling nothing else.</p>

<h2 id="five-tenants-five-primitives" class="anchor-link"><a href="#five-tenants-five-primitives">Five tenants, five primitives<span class="pilcrow">&nbsp;¶</span></a></h2>
<p>The comparison is the argument:</p>
<table>
  <thead>
      <tr>
          <th></th>
          <th>VM</th>
          <th>Container</th>
          <th>Function</th>
          <th>Agent sandbox</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><strong>Tenant</strong></td>
          <td>monolith app</td>
          <td>microservice</td>
          <td>event handler</td>
          <td>agent attempt</td>
      </tr>
      <tr>
          <td><strong>Lifetime</strong></td>
          <td>years</td>
          <td>days to months</td>
          <td>milliseconds</td>
          <td>one task</td>
      </tr>
      <tr>
          <td><strong>Cold start</strong></td>
          <td>minutes</td>
          <td>seconds</td>
          <td>~100ms</td>
          <td>milliseconds, and falling</td>
      </tr>
      <tr>
          <td><strong>State</strong></td>
          <td>on the machine</td>
          <td>externalized</td>
          <td>none</td>
          <td>snapshot &amp; fork</td>
      </tr>
      <tr>
          <td><strong>Trust model</strong></td>
          <td>trusted code, untrusted neighbors</td>
          <td>trusted code, shared kernel</td>
          <td>trusted code, multi-tenant</td>
          <td>untrusted code, hostile by assumption</td>
      </tr>
      <tr>
          <td><strong>Failure</strong></td>
          <td>page someone</td>
          <td>restart the pod</td>
          <td>retry</td>
          <td>harvest it—failure is data</td>
      </tr>
      <tr>
          <td><strong>Priced by</strong></td>
          <td>instance-hours</td>
          <td>vCPU-seconds</td>
          <td>invocations</td>
          <td>session-minutes &amp; attempts</td>
      </tr>
  </tbody>
</table>
<p>Read down the last column and the pattern is clear: this isn&rsquo;t a smaller function. It&rsquo;s a different tenant. Every era of compute got the isolation its tenant deserved—and this tenant thinks.</p>

<h2 id="the-workload" class="anchor-link"><a href="#the-workload">The workload<span class="pilcrow">&nbsp;¶</span></a></h2>
<p>Six properties make agents unlike everything the cloud has hosted before. Each one forces a primitive.</p>
<p><strong>Untrusted from the inside.</strong> Every previous isolation model protected the workload from the world and tenants from each other—the code itself was assumed friendly, because a human wrote and reviewed it. An agent inverts the assumption: the code being executed was written seconds ago by a stochastic process, possibly steered by whatever hostile text the agent read on the way in. The workload is the adversary. CI systems ran semi-trusted code at human cadence with review gates; agents run it at machine speed with none. That forces hard isolation as the <em>default</em>, not the paranoid option—and it makes network egress a security control, not a networking detail, because exfiltration is the first thing a prompt-injected agent tries. The serious platforms ship egress allowlists and full network blocks as first-class sandbox settings.</p>
<p><strong>Mayflies, not cattle.</strong> Pets became cattle; cattle are becoming mayflies. The sandbox wants to be born, do one thing, and die—and the death is the product, because destruction is what guarantees the next attempt a clean slate. When the unit of compute lives for seconds, the defining performance metric flips from utilization to <strong>cold start</strong>, which is why every vendor&rsquo;s homepage is a millisecond number and why the engineering goes down two roads: kernels stripped until they boot in ~125 milliseconds—Firecracker&rsquo;s entire design brief—and snapshots that skip booting altogether, memory-mapping a ready machine image back to life in single-digit milliseconds. Warmth stored on disk, not warmth kept running.</p>
<p><strong>State that branches—and pauses.</strong> Traditional architecture pushed state out of compute: stateless services, databases of record. Agents want the opposite—<em>forkable execution</em>. Try three fixes from one checkpoint. Branch an RL rollout at the decision point. Pause mid-task for six hours while a human approves the next step, then resume from exactly that machine state at storage prices instead of compute prices. That&rsquo;s process-level time travel, and no mainstream workload ever demanded it—which is why snapshot, restore, and fork are becoming API surface rather than ops tooling. Memory snapshots already cut cold starts by multiples on the platforms that ship them. The cloud is finally getting a <code>fork()</code> syscall.</p>
<p><strong>Failure is the signal.</strong> SRE culture minimizes failure; agent execution harvests it. An agent runs code to find out whether the code works—execution as hypothesis testing, the sandbox as laboratory rather than factory. In RL training this is explicit: each trajectory is an agent trying whatever maximizes reward, side effects included, and every rollout needs a clean world to wreck. So the substrate&rsquo;s job isn&rsquo;t five nines of uptime—it&rsquo;s a fast, rich verdict channel: exit codes, artifacts, diffs, telemetry, and increasingly a score. No previous cloud graded its tenants.</p>
<p><strong>Particle-physics concurrency.</strong> One agent task fans into a hundred parallel tool executions. One training experiment is ten thousand rollouts for twenty minutes, then silence. Production platforms already report tens of thousands of concurrent sandboxes for a single customer event, and the training-side operators run hundreds of thousands of concurrent environments. Reactive autoscaling is useless against this shape—the burst is over before the autoscaler notices. What works is snapshot fan-out plus fleet headroom: fork one initialized image into ten thousand copy-on-write clones, so the swarm restores into existence instead of booting into it, on hosts whose spare capacity was provisioned before the burst. (Sizing that headroom is a newsvendor problem—<a href="/posts/business/inventory-theory-cloud-capacity/" >inventory theory</a> has opinions.)</p>
<p><strong>The browser is a device class.</strong> For agents, the browser is what the terminal was for humans: the universal interface to everything that never got an API. That makes browser-in-a-sandbox a standard SKU, not an exotic one—a live Chromium session with the same containment as a code sandbox plus three things code sandboxes never needed: session persistence, credential handling, and a human-takeover path. It&rsquo;s why the managed-browser vendors (Browserbase, Steel, Hyperbrowser) look less like scraping tools every quarter and more like a compute primitive. The browser is the new SSH.</p>

<h2 id="what-is-a-sandbox-really" class="anchor-link"><a href="#what-is-a-sandbox-really">What is a sandbox, really<span class="pilcrow">&nbsp;¶</span></a></h2>
<p><a href="/posts/linux/what-is-a-container/" >Containers</a> isolated you from your <em>neighbors</em>—namespaces and cgroups drawing lines between tenants who all ran code they trusted. Agent sandboxes must isolate you from <em>the workload itself</em>, and three lineages compete on how:</p>
<div class="d2-diagram"><img src="https://svalle.ru/d2/cff8c117f184a855.svg" alt="Three isolation lineages side by side: Firecracker runs a microVM with its own kernel per sandbox, gVisor runs a user-space kernel that intercepts syscalls, and Kata runs containers inside lightweight VMs" loading="lazy"></div><p>Firecracker gives every sandbox its own kernel—a container escape ends at that VM&rsquo;s wall. E2B and Vercel&rsquo;s sandboxes take this path. gVisor interposes a user-space kernel that filters syscalls before they reach the host—lower overhead, no separate kernel—and it&rsquo;s how Modal isolates. Kata wraps containers in lightweight VMs, splitting the difference. The detail worth savoring: this entire lineage was built over the past decade for multi-tenant serverless, an era when the threat was your neighbor. Then a tenant arrived whose threat is itself, and the isolation stack turned out to be accidental preparation. Call it the isolation dividend.</p>

<h2 id="the-trace" class="anchor-link"><a href="#the-trace">The trace<span class="pilcrow">&nbsp;¶</span></a></h2>
<p>What actually happens when an agent runs <code>pip install &amp;&amp; pytest</code>:</p>
<div class="d2-diagram"><img src="https://svalle.ru/d2/843290998db2e8d1.svg" alt="The life of one sandbox execution: an API request hits the control plane, is placed on a host with spare capacity, restores from a template snapshot, passes an egress policy gate, executes, has its exit code and artifacts and telemetry collected, receives a verdict, and is destroyed or snapshotted for forking" loading="lazy"></div><p>Every stage exists because of a property above. The placement step exists because of particle-physics concurrency. The snapshot restore exists because of mayfly lifetimes. The egress gate exists because the workload is the adversary. The verdict exists because failure is the signal. And the final fork option exists because the most valuable thing a finished sandbox can do is become two sandboxes. This is the request path of a cloud whose unit of work is the <em>attempt</em>.</p>

<h2 id="four-demand-curves" class="anchor-link"><a href="#four-demand-curves">Four demand curves<span class="pilcrow">&nbsp;¶</span></a></h2>
<p>One primitive, four buyers:</p>
<div class="d2-diagram"><img src="https://svalle.ru/d2/5f483e8edae025a9.svg" alt="The sandbox primitive serving four demand curves: inference-time execution needing low cold start and scale to zero, training-time RL rollouts needing fork and massive parallelism and a reward channel, evals needing deterministic replay of traces, and serving, where the AI-generated artifact keeps running inside the sandbox" loading="lazy"></div><p>Inference—production agents acting—is the visible curve, and it prices like serverless. Training is the steep one: RL on agentic tasks consumes environments in parallel thousands per experiment, an environments marketplace has formed on top (Prime Intellect&rsquo;s hub carries thousands of open RL environments; Mechanize builds them for labs), and the frontier labs have reportedly discussed spending over a billion dollars a year on environments alone. An RL environment, stripped of ceremony, is a sandbox plus a reward function—sandboxes with rubrics. Evals are the third curve and the quiet constant: every serious agent team replays production traces and runs simulated adversaries inside the same isolation, which means the eval harness from the <a href="/posts/ai/anatomy-of-a-vertical-ai-agent/" >anatomy post</a> is a sandbox customer whether it knows it or not.</p>
<p>The fourth curve is the one the agent loop doesn&rsquo;t contain: serving. The app-generation platforms—the Lovable class—produce software whose <em>runtime</em> is a sandbox: the preview URL behind a vibe-coded app is a microVM with a tunnel to it, and production platforms have run tens of thousands of them concurrently for a single customer. This is where the title stops being a metaphor, because AI-written software doesn&rsquo;t become trusted when it starts working—the isolation follows the artifact into production, and the sandbox literally is the server. (It also prices like hosting rather than attempts—the exception that maps the boundary.) Step back and all four curves are the same substrate activity, arbitrary code execution, distinguished only by what the buyer wants back: a result, a gradient, a grade, an uptime.</p>

<h2 id="compute-for-attempts" class="anchor-link"><a href="#compute-for-attempts">Compute for attempts<span class="pilcrow">&nbsp;¶</span></a></h2>
<p>Follow the pricing unit and you can watch the industry reprice itself. VMs sold instance-hours—you paid for existence. Functions sold invocations—you paid for events. Sandboxes sell session-minutes and forks—you pay for <em>attempts</em>. That&rsquo;s the honest unit for a tenant whose job is trying things, and it has a property the old units didn&rsquo;t: attempt volume scales with model capability, not with end-user traffic. Every improvement in agent reliability increases how much work gets delegated, which increases attempts. The demand curve compounds from the supply side.</p>
<p>The market structure is a squeeze. From above: the hyperscalers and the labs are bundling execution primitives into their agent platforms, and a bundled good-enough sandbox is how platforms have always eaten adjacent categories. From below: the isolation layer is open source—Firecracker, gVisor, Kata—so the moat can&rsquo;t be the wall itself. What&rsquo;s left, and it&rsquo;s real, is everything around the wall: cold-start engineering measured in single-digit milliseconds, fleet scheduling that absorbs particle-physics bursts, snapshot infrastructure that makes fork cheap, and the rubric layer that turns execution into judgment. Sovereignty pressure cuts the same way it did in the <a href="/posts/ai/anatomy-of-a-vertical-ai-agent/" >vertical AI stack</a>: data-residency rules and national-AI programs push execution inside jurisdictional boundaries—and the category has already split along exactly that line. E2B and Steel ship open-source runtimes you can stand up inside your own cloud; Modal and Vercel&rsquo;s sandboxes are managed-only, no BYOC. In a sovereign world that split is strategy, not packaging: the open-runtime vendors can follow demand into any boundary—and must find their moat in fleet operations, since anyone can run their wall—while the closed ones either build a deployable story or cede every regulated deal to the open source underneath.</p>

<h2 id="objections" class="anchor-link"><a href="#objections">Objections<span class="pilcrow">&nbsp;¶</span></a></h2>
<p><em>Isn&rsquo;t this just Lambda?</em> No—by construction. Functions assume trusted code; sandboxes assume the opposite. Functions have no fork, no browser, no verdict channel, and duration caps that make a six-hour human-approval pause impossible. Lambda priced the event. This prices the attempt.</p>
<p><em>Aren&rsquo;t containers enough?</em> Not when the author is adversarial. A shared kernel plus a workload that writes its own syscalls is exactly the threat model containers were never asked to hold—and containers have no snapshot semantics, so the fork property dies at the runtime.</p>
<p><em>Haven&rsquo;t sandboxes existed forever?</em> As features, yes—coding judges, CI runners, notebook hosts, and plugin platforms have executed untrusted code for decades, each building its isolation internally, each for one narrow job. Agents changed the volume (machine cadence), the generality (any task), and the buyer (everyone shipping agents). The activity is old. The standalone market is what&rsquo;s new.</p>
<p><em>Are servers actually dying?</em> No, and the title doesn&rsquo;t need them to. The claim is about the marginal unit: where <em>new</em> compute demand lands. It&rsquo;s landing in attempts.</p>

<h2 id="the-primitive-mapped" class="anchor-link"><a href="#the-primitive-mapped">The primitive, mapped<span class="pilcrow">&nbsp;¶</span></a></h2>
<table>
  <thead>
      <tr>
          <th>Property of the workload</th>
          <th>Primitive it forces</th>
          <th>Who&rsquo;s selling it</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><strong>Untrusted from the inside</strong></td>
          <td>hard isolation by default; egress as policy</td>
          <td>E2B (Firecracker), Modal (gVisor), Daytona</td>
      </tr>
      <tr>
          <td><strong>Mayfly lifetime</strong></td>
          <td>fast boot + snapshot restore</td>
          <td>the entire category, benchmarked in ms</td>
      </tr>
      <tr>
          <td><strong>State that branches &amp; pauses</strong></td>
          <td>snapshot / restore / fork as API</td>
          <td>memory snapshots, persistence tiers</td>
      </tr>
      <tr>
          <td><strong>Failure as signal</strong></td>
          <td>verdict channels, rich telemetry</td>
          <td>eval harnesses, RL reward plumbing</td>
      </tr>
      <tr>
          <td><strong>Particle-physics concurrency</strong></td>
          <td>snapshot fan-out, fleet headroom</td>
          <td>tens of thousands concurrent, per customer</td>
      </tr>
      <tr>
          <td><strong>Browser as device class</strong></td>
          <td>managed sessions, auth, takeover</td>
          <td>Browserbase, Steel, Hyperbrowser</td>
      </tr>
  </tbody>
</table>
<p>The arc that started with time-sharing ends, for now, with a tenant that thinks, fails on purpose, and gets graded—and a primitive shaped exactly like it. The attempt is becoming a billable unit of compute. Billable units of compute have a way of becoming industries.</p>
]]></content:encoded>
      <dc:creator>Shan Valleru</dc:creator>
      <category>AI</category>
      <category>agents</category>
      <category>infrastructure</category>
      <category>sandboxes</category>
      <category>cloud</category>
      <category>Kubernetes-adjacent</category>
    </item>
  </channel>
</rss>
