WhoBuilt

Sandboxes Aren't Optional: 4 Ways to Isolate Coding Agents

Oct 12, 2026· 14 min· 52K views·Watch on YouTube

Speaker

Robert Brennan, CEO of OpenHands, explains why coding agents need sandboxes and compares four ways to isolate them at an AI Engineer talk.

From code suggestions to cloud agents

Brennan traces the shift from chatbot code snippets to AI-powered IDEs and agents that run code, inspect errors, and iterate. He says organizations are moving toward cloud agents that respond to events, with multi-agent workflows as a next step.

Apply least privilege

Local agents can either ask for repeated permission or run with broad access to files, environment variables, and connected production systems. Brennan recommends giving agents only the repository and secrets they need, limiting the damage from mistakes or prompt injection.

Compare local containers and GitHub Actions

A fresh Docker container per conversation gives an agent an ephemeral workspace, while allowing selected files, ports, and secrets to be mounted in. GitHub Actions can run agents on schedules or pull request events at cloud scale, but ties automation to GitHub events and infrastructure.

Compare persistent VMs and Kubernetes

A dedicated VM can listen for webhooks from services such as Slack, Datadog, and GitHub, but its persistent state can degrade and co-located agents may share access. Kubernetes can give each session an ephemeral pod, supporting isolated workspaces and large-scale, event-driven runs.

Choose a sandbox with care

Brennan compares the options by location, scale, isolation, persistence, and triggers. He cautions that sandboxes can be escaped, so they are only a first layer of protection, and describes OpenHands Agent Canvas as a way to switch between local, Docker, VM, and Kubernetes environments.

Takeaways

  • Give each agent only the files, credentials, and services needed for its task.
  • Use local containers for iterative work that benefits from access to a workstation copy of the code.
  • Use scheduled or event-driven cloud runs when agents need to work without a person present.
  • Prefer per-session ephemeral environments when isolation, clean state, and scale matter.
  • Treat sandboxing as one security layer; container escapes remain possible.

Mentioned in this talk

Search inside this talk

What was claimed 9

  • founded
    “I co-founded it a little over two years ago”
    YouTube
    Verified6 sources· Talk, Web· archived
  • ceo of
    CEO
    “I'm the CEO at OpenHands”
    YouTube
    Verified2 sources· Talk
  • launched
    OpenHands: MIT-licensed coding agent
    “We started OpenHands as an MIT-licensed coding agent”
    YouTube
    Unverified1 source· Talk
  • feature
    Docker: Provides an ephemeral container for an agent conversation
    “every time you started a new conversation with the agent, we'd spin up a brand-new Docker container”
    YouTube
    Unverified1 source· Talk
  • feature
    GitHub Actions: Runs agents in ephemeral environments and supports scheduled workflows
    “Everything goes away once that action spins down”
    YouTube
    Unverified1 source· Talk
  • feature
    virtual machine: Provides a long-lived environment with persistence and webhook support
    “now you've got a long-lived environment”
    YouTube
    Unverified1 source· Talk
  • feature
    Kubernetes: Provides an ephemeral pod for each agent session
    “You get a pod for every agent session you want to run”
    YouTube
    Unverified1 source· Talk
  • metric
    Kubernetes: Can run thousands of agents
    “If you're in Kubernetes, you can run thousands”
    YouTube
    Unverified1 source· Talk
Show all 9 facts

Related talks