---
title: "How I Learned to Stop Worrying and Love the Sandbox"
description: "A hands-on lab in running sandboxes: runaway processes, memory pressure, full disks, idle timeouts and per-user workspaces."
date: "2026-10-05T11:00:17-07:00"
author: matt-brockman
categories:
  - talks
thumbnail: "./thumbnail.png"
thumbnailAlt: "Matt Brockman on stage at AI Engineer World's Fair 2026, next to the words Love the sandbox"
talk:
  youtube: fz6-NS7qpZc
  length: "59:33"
  format: workshop
  event: AI Engineer World's Fair 2026
  city: San Francisco
  recordedBy: AI Engineer
  poster: "./poster.jpg"
  speakers:
    - matt-brockman
  chapters:
    - { at: "0:00", title: Introduction and capture the flag setup }
    - { at: "2:51", title: Why agents need sandboxes }
    - { at: "4:27", title: Snapshots and templates }
    - { at: "8:08", title: Opening the lab and finding a sandbox ID }
    - { at: "16:02", title: Runaway processes and isolated environments }
    - { at: "18:43", title: Debugging CPU usage }
    - { at: "20:30", title: Memory pressure }
    - { at: "21:57", title: Finding a full disk }
    - { at: "25:12", title: Correcting the disk cleanup exercise }
    - { at: "31:14", title: Sandbox lifetimes and idle timeouts }
    - { at: "39:04", title: Cleaning up background processes }
    - { at: "42:31", title: Mapping users to workspaces }
    - { at: "48:30", title: Filesystem permissions and runtime caches }
    - { at: "50:08", title: Audience questions on sandbox operations }
    - { at: "54:24", title: "Storage, volumes, and orchestration" }
    - { at: "57:12", title: "Templates, local development, and network access" }
  takeaways:
    - at: "4:27"
      text: A snapshot keeps memory, files and running processes. Work resumes where it stopped, and forgotten processes come back too.
    - at: "18:43"
      text: Check CPU first. One runaway process at 99.7% starves everything else in the sandbox.
    - at: "21:57"
      text: A full disk looks like a broken app. Find the file that fills it before you debug code.
    - at: "31:14"
      text: Give a task time to finish, then shorten the idle timeout so unused sandboxes stop.
    - at: "42:31"
      text: Map each user to a sandbox ID instead of round robin, so people come back to the same workspace.
    - at: "48:30"
      text: Keep template files read-only and send runtime writes, like caches, to a writable path.
  links:
    - { label: Sandbox lifecycle docs, href: "https://docs.e2b.dev/sandbox" }
    - { label: E2B on GitHub, href: "https://github.com/e2b-dev/E2B" }
---

Matt runs the room through deliberately broken sandboxes, capture-the-flag style. Each fix unlocks the next level, and each challenge runs in its own sandbox, so a mistake resets without breaking anyone else's.

The second half goes from one sandbox to thousands: how long a sandbox should live, how to send each user back to the same workspace, and what a restored snapshot brings back with it. The Q&A covers volumes, storage growth, orchestration and network limits.
