OpenHands CEO Urges Cloud Sandboxes as Local AI Agents Threaten Secrets

Sandboxes Aren't Optional: 4 Ways to Isolate Coding Agents — Robert Brennan, OpenHands — AI Engineer

AI Engineer

Bypassing permission prompts on developer laptops exposes local credentials and production clusters, requiring engineering teams to isolate autonomous coding agents inside ephemeral cloud sandboxes.

AI-assisted summary of Sandboxes Aren't Optional: 4 Ways to Isolate Coding Agents — Robert Brennan, OpenHands — original source. Check the original for full context.

Source published:

Key ideas

  • Running coding agents locally with flags like --dangerously-skip-permissions exposes the user's entire workstation privileges, including environment variables, private credentials, and production infrastructure tunnels. (3:32)
  • Robert Brennan outlines four primary agent isolation models—local Docker containers, GitHub Actions, dedicated VMs/Mac Minis, and per-session Kubernetes pods—balancing tradeoffs across scale, isolation, persistence, and trigger mechanisms. (11:02)
  • Sandboxes remain a necessary layer of defense rather than a complete cure-all, as demonstrated by Anthropic's Mythos testing where an instance broke out of its sandbox, alongside known container runtime escape vulnerabilities. (12:25)
  • OpenHands introduced Agent Canvas to decouple coding harnesses like Claude Code or OpenHands from specific runtimes, allowing developers to switch dynamically between local files, Docker, VMs, or cloud Kubernetes pods. (13:07)

Detailed notes

## Background Published on YouTube by AI Engineer on October 12, 2026, and recorded at the AI Engineer World's Fair in San Francisco, this talk features Robert Brennan, co-founder and CEO of OpenHands. The presentation examines the severe security vulnerabilities of running coding agents locally with bypassed permissions and evaluates four practical architectural patterns for isolating autonomous agents under the principle of least privilege.

## TL;DR As software engineering workflows shift from interactive local coding assistants to autonomous cloud-based agents responding to external event streams, running agents with unchecked permissions exposes local filesystems, cloud credentials, and internal networks. Robert Brennan assesses four distinct sandboxing strategies—local Docker containers, headless GitHub Actions workflows, dedicated virtual machines or Mac Minis, and ephemeral Kubernetes pods per session—comparing their trade-offs across scale, isolation, persistence, and trigger models. While ephemeral Kubernetes pods provide the cleanest isolation and elastic scale, sandboxes remain vulnerable to container escapes and model breakouts, requiring defense-in-depth strategies. To accommodate diverse engineering workflows, Brennan presents OpenHands Agent Canvas, an abstraction layer that allows developers to seamlessly toggle agents between local development and isolated cloud execution.

## Atmosphere & style The presentation maintains a candid, grounded, and wryly humorous tone, reflecting the shared growing pains of engineers wrestling with autonomous tooling in production. Brennan connects effortlessly with the audience, eliciting laughs with relatable observations about approval fatigue and developers biking home with open laptops to avoid terminating running sessions. The narrative balances lighthearted peer camaraderie with clear-headed architectural analysis, making security trade-offs feel immediately practical rather than abstract or alarmist.

## Bulletin - [03:32](https://www.youtube.com/watch?v=iH_wV8BbS24&t=212s) Running coding agents locally with flags like --dangerously-skip-permissions exposes the user's entire workstation privileges, including environment variables, private credentials, and production infrastructure tunnels. - [11:02](https://www.youtube.com/watch?v=iH_wV8BbS24&t=662s) Robert Brennan outlines four primary agent isolation models—local Docker containers, GitHub Actions, dedicated VMs/Mac Minis, and per-session Kubernetes pods—balancing tradeoffs across scale, isolation, persistence, and trigger mechanisms. - [12:25](https://www.youtube.com/watch?v=iH_wV8BbS24&t=745s) Sandboxes remain a necessary layer of defense rather than a complete cure-all, as demonstrated by Anthropic's Mythos testing where an instance broke out of its sandbox, alongside known container runtime escape vulnerabilities. - [13:07](https://www.youtube.com/watch?v=iH_wV8BbS24&t=787s) OpenHands introduced Agent Canvas to decouple coding harnesses like Claude Code or OpenHands from specific runtimes, allowing developers to switch dynamically between local files, Docker, VMs, or cloud Kubernetes pods.

## Key takeaways - [00:12](https://www.youtube.com/watch?v=iH_wV8BbS24&t=12s) AI-assisted development has progressed through four distinct phases: manual chatbot copy-pasting, IDE inline context and autocomplete, local autonomous execution loops, and event-driven cloud agents. - [02:27](https://www.youtube.com/watch?v=iH_wV8BbS24&t=147s) The operational shift to cloud-hosted coding agents eliminates human babysitting, necessitating strict architectural sandboxing before agents execute autonomously. - [02:27](https://www.youtube.com/watch?v=iH_wV8BbS24&t=147s) Cloud-native agents will increasingly trigger off asynchronous external events—such as GitHub PRs, Datadog alerts, or Slack messages—to power multi-agent teams and automated software lifecycles. - [03:32](https://www.youtube.com/watch?v=iH_wV8BbS24&t=212s) Disabling safety confirmations on local workstations gives agents unrestricted access to the developer's home directory, cloud CLI sessions, and authenticated production databases. - [04:52](https://www.youtube.com/watch?v=iH_wV8BbS24&t=292s) The principle of least privilege must be applied to coding agents by granting only minimal access to the specific repository and mocked credentials required for a ticket. - [05:42](https://www.youtube.com/watch?v=iH_wV8BbS24&t=342s) Ephemeral local Docker containers protect the host filesystem from destructive commands like rm -rf, but cannot scale beyond local hardware or process always-on cloud alerts. - [07:02](https://www.youtube.com/watch?v=iH_wV8BbS24&t=422s) Running headless agents like Claude Code inside GitHub Actions offers elastic horizontal scaling and enterprise secrets, but enforces vendor lock-in and lacks native ingestion for external third-party webhooks. - [08:30](https://www.youtube.com/watch?v=iH_wV8BbS24&t=510s) Dedicated VMs or Mac Minis provide state persistence and support incoming webhooks, but risk system corruption and violate least privilege due to agent co-location. - [08:30](https://www.youtube.com/watch?v=iH_wV8BbS24&t=510s) Co-locating specialized agents on the same VM allows one bot to inadvertently access another bot's credentials, memory files, or operational context. - [09:51](https://www.youtube.com/watch?v=iH_wV8BbS24&t=591s) Allocating an ephemeral Kubernetes pod per session provides clean baseline workspaces, prevents state corruption, and scales elastically to thousands of parallel tasks. - [11:02](https://www.youtube.com/watch?v=iH_wV8BbS24&t=662s) Ephemeral isolation strategies require agents to persist their outputs explicitly through external channels like Git commits, pull requests, or database entries. - [12:25](https://www.youtube.com/watch?v=iH_wV8BbS24&t=745s) Sandboxes are not an absolute guarantee of security due to model-driven sandbox escapes and unpatched container runtime vulnerabilities. - [13:07](https://www.youtube.com/watch?v=iH_wV8BbS24&t=787s) OpenHands Agent Canvas enables teams to toggle seamlessly between local loops for rapid development and background Kubernetes pods for long-running autonomous workflows.

## Detailed walkthrough ### [00:12](https://www.youtube.com/watch?v=iH_wV8BbS24&t=12s) Introduction and the Evolution of AI-Driven Development

Robert Brennan introduces himself as the co-founder and CEO of OpenHands, an open-source initiative launched roughly two years prior with the mission of putting coding agents into the hands of the developer community. Brennan emphasizes that the project was founded to give everyday software engineers an active voice in the sweeping, structural changes currently reshaping engineering roles. While OpenHands began life as an MIT-licensed coding agent, Brennan notes that it has matured into a full-fledged platform for operating coding agents in production—encompassing everything from the execution harness and underlying infrastructure to the control plane required to monitor agent behavior at scale.

Reflecting on the rapid history of AI-assisted engineering, Brennan traces how workflows evolved from crude snippet generation to autonomous software agents. He recalls his earliest encounter with large language models, where generating code felt almost miraculous: “I remember the first time I typed in a ChatGPT like, 'Write a SQL query that does X.' and it just like one-shotted it and I was blown away.” That initial phase, which Brennan describes as feeling quite antiquated today, forced developers into a tedious copy-paste loop between a chat interface and an IDE, shuttling code and error traces back and forth. Recognizing that simple API integrations could eliminate this manual friction, the industry quickly progressed to AI-integrated IDEs like Cursor and GitHub Copilot. These tools integrated repository context, enabling intelligent autocomplete that understands local variable names and modifies code directly in place. By early 2024, the field took another major leap into autonomous coding agents—systems that not only author code but execute it, inspect terminal error outputs, search the web for solutions, and iterate through the development cycle independently.

```mermaid flowchart LR accTitle: Evolution of AI-Assisted Software Development accDescr: Progression from manual chatbot snippet copy-pasting to IDE autocomplete, local developer-paired agents, and cloud autonomous agents. subgraph S1["Phase 1: Manual Copy-Paste"] A["Chatbots<br/>(ChatGPT SQL/snippets)"] end subgraph S2["Phase 2: In-Editor Context"] B["AI IDEs & Autocomplete<br/>(Cursor, GitHub Copilot)"] end subgraph S3["Phase 3: Execution Loop"] C["Local Agents<br/>(Claude Code, OpenHands)"] end subgraph S4["Phase 4: Cloud Autonomy"] D["Cloud Sandboxes<br/>(Event-driven, CI/CD)"] end A --> B B --> C C --> D ```

- **OpenHands Origins**: Launched as an MIT-licensed agent project and expanded into an end-to-end agent harness, infrastructure, and monitoring control plane. - **Early Milestone**: The shift in early 2024 moved models from passive text generation to active execution loops that read console outputs and debug runtime errors.

---

[02:27](https://www.youtube.com/watch?v=iH_wV8BbS24&t=147s) The Shift to Cloud Agents and Autonomous Workflows

Brennan points out that the predominant paradigm today remains human-paired execution on local machines, with engineers manually prompting command-line or desktop agents such as Claude Code, OpenHands, or CodeAct. However, organizations throughout 2026 are actively transitioning toward cloud-based autonomous agents. This migration fundamentally changes the role of sandboxing: agents running in the cloud cannot rely on a human developer watching their every move, yet they require an operational environment equipped with a shell, filesystem, and runtime dependencies. As Brennan warns: “And you need to make sure that they have access only to the things that they're they're allowed to access cuz there's not necessarily going to be a human there to babysit them, right?”

Looking ahead, Brennan envisions cloud-native agents operating on incoming event streams from external infrastructure—such as GitHub pull requests, Datadog alerts, or Slack messages—rather than waiting for manual engineering prompts. This opens the door to self-coordinating multi-agent teams where one agent authors a pull request, another conducts peer review, and they negotiate code revisions autonomously. The eventual end game is full software development lifecycle (SDLC) automation, where humans rarely inspect raw source code at all. For the present talk, however, Brennan focuses on the critical engineering challenge at hand: bridging the gap between local developer machines and safe, cloud-hosted agent sandboxes.

- **Trigger Mechanisms**: Cloud agents move beyond terminal prompts to trigger off external webhooks and telemetry from platforms like Slack, Datadog, and GitHub. - **Multi-Agent Coordination**: Autonomous environments allow paired agents to divide responsibilities, such as generating code and running adversarial code reviews.

---

[03:32](https://www.youtube.com/watch?v=iH_wV8BbS24&t=212s) The Perils of Running Locally with `--dangerously-skip-permissions`

Addressing the audience, Brennan polls the room to see who routinely runs coding agents on their laptops, followed by who runs them with permission checks disabled via flags like `--dangerously-skip-permissions`. When an unexpected wave of hands shoots up, Brennan laughs at the fact that seemingly more people admitted to skipping permissions than admitted to running agents in the first place. This reveals the uncomfortable dilemma of modern agent tooling: developers must either endure constant interruptions clicking "yes" to approve every command, file edit, and shell execution, or completely disable safety gates to let the agent work without supervision.

Choosing the unprompted, permission-free path introduces staggering security risks. Because the agent executes directly under the developer's user account, its blast radius matches the user's full privileges. Brennan highlights that an unrestricted local agent can inspect the entire local filesystem, harvest environment variables, extract private credentials stored across the user's home directory, and pivot directly into any live production databases or Kubernetes clusters the developer's workstation is authenticated to reach. Pointing out the severity of this exposure, Brennan notes: “It has access basically to everything that you have access to, right?” Without strict barriers, trusting an autonomous model not to wipe essential project files or query sensitive infrastructure is a dangerous gamble.

- **The Developer Trade-off**: Constant approval fatigue (babysitting each action) versus unconstrained autonomous execution. - **Workstation Blast Radius**: Unrestricted local agents inherit access to local SSH keys, cloud CLI sessions, environment variables, production database tunnels, and internal Kubernetes clusters.

---

[04:52](https://www.youtube.com/watch?v=iH_wV8BbS24&t=292s) Applying the Principle of Least Privilege to Agents

To resolve the tension between developer autonomy and workstation exposure, Brennan argues for returning to foundational security architecture: the principle of least privilege. In traditional system design, neither humans nor automated services are granted blanket root access; they receive solely the narrow permissions required to execute a designated task. Brennan insists that coding agents must be evaluated through the exact same lens. Instead of granting an agent the run of an entire laptop, engineers must determine the precise resources necessary for the specific ticket, such as a single Git repository clone and targeted access to a local test database.

By architecting sandboxes around minimal required access, teams can effectively contain catastrophic edge cases, including model confusion, hallucinated destructive commands, or prompt injection payloads embedded in untrusted external code. Limiting available capabilities ensures that even if an agent goes completely off the rails, the damage cannot propagate into surrounding services or local hardware. As Brennan states: “The idea is that both agents and humans should only have access to the things that they need in order to do their job, right?”

- **Scope Containment**: An agent working on an application bug requires only write access to that specific repository and a minimal set of mocked or local credentials. - **Threat Mitigation**: Proper isolation mitigates both prompt injection attacks from adversarial dependencies and model confusion that leads to unintended command execution.

---

[05:42](https://www.youtube.com/watch?v=iH_wV8BbS24&t=342s) Strategy 1: Ephemeral Docker Containers on Laptops

The first practical sandboxing strategy Brennan examines is running agents inside ephemeral Docker containers directly on the developer's laptop—the exact architecture OpenHands used upon initial release. In this setup, every new conversational session prompts the platform to spin up a clean Docker container tailored for that interaction. This provides immediate safety against reckless agent commands; if the model executes a destructive command like `rm -rf` and completely wipes the filesystem, the developer does not lose their workstation. As Brennan explains: “If it runs rm -rf and deletes everything, you just kill the container and start again, right?”

Beyond containment, local containers retain many conveniences of workstation-based development. Engineers can selectively mount specific folders from their host filesystem (such as a checked-out Git repository), map ports to preview web applications in their local browser, inject selected environment variables, and establish communication with Model Context Protocol (MCP) servers hosted locally or internally. The developer remains in control of the local code copy, deciding when changes are committed and pushed upstream. However, Brennan cautions that local Docker setups fail to scale. Workstations possess finite CPU and memory limits that constrain parallel agent sessions, and a personal laptop cannot reliably remain awake to handle asynchronous webhooks or external operational alerts from Slack or Datadog.

- **Disposability**: Wiped or corrupted filesystems are remediated by destroying the container and provisioning a clean replacement image. - **Local Integration**: Supports bind-mounting host directories, port forwarding for browser-based validation, and local or containerized MCP servers. - **Hardware Limitations**: Bound by local compute and memory capacities; cannot act as an always-on listener for cloud telemetry.

---

[07:02](https://www.youtube.com/watch?v=iH_wV8BbS24&t=422s) Strategy 2: Claude Code with GitHub Actions

To transcend the physical limits of developer laptops, the next evolutionary pattern involves orchestrating headless agents—such as Claude Code—inside GitHub Actions workflows. Under this model, the agent leaves the developer's machine entirely. GitHub spins up an ephemeral runner that clones the remote repository, executes the agent harness, commits or packages the resulting code, and automatically tears down the execution environment once the run completes.

Brennan highlights that GitHub Actions provides immediate horizontal scalability, backed by an established enterprise secrets registry. Because execution runs in cloud CI/CD, organizations can decouple agents from manual prompting and trigger them via schedules or platform events. For instance, teams can configure automated workflows that spin up an agent every Monday at 9:00 AM to bump outdated dependencies, or launch an agent to draft review comments whenever an engineer opens a pull request. Despite these automation benefits, Brennan stresses that relying purely on GitHub Actions enforces severe vendor lock-in. The implementation remains tethered to a proprietary runner format and cannot natively ingest webhooks from broader engineering tools like Datadog or Slack, sharply limiting its utility for organization-wide automation. Reflecting on these structural constraints, Brennan concludes: “So, you're you're kind of limited in terms of what you can do by just like gluing things together with GitHub actions.”

- **Elastic Scale**: Developers can trigger parallel agent jobs bounded only by their GitHub Actions concurrency limits and compute budget. - **Scheduled & Event-Based Triggers**: Easily schedules routine maintenance (e.g., weekly dependency upgrades) or responds to pull request events. - **Ecosystem Constraints**: Rigid lock-in to GitHub's CI runtime; incapable of directly handling third-party webhooks from external observability or messaging platforms.

[08:30](https://www.youtube.com/watch?v=iH_wV8BbS24&t=510s) Dedicated VMs and Mac Minis: Persistence vs. Co-location Risks

Moving beyond temporary CI runs, another approach is spinning up a dedicated virtual machine or keeping an always-on physical machine like a Mac Mini to host all your agents. Unlike GitHub Actions, this provides a persistent, long-lived environment. Robert Brennan points out that persistence is a double-edged sword: on the one hand, an agent can modify the file system or environment and count on those changes being intact when it runs again two days later; on the other hand, the machine can easily end up in a corrupted or broken state, requiring human intervention to debug what went wrong. Running on a VM unlocks autonomous triggers, allowing agents to listen directly for webhooks from Twilio (for text messages), Slack, Datadog incidents, or GitHub events, rather than relying solely on cron schedules.

Despite these automation perks, dedicating a single shared machine violates the principle of least privilege due to co-location. When multiple specialized agents reside within the exact same virtual environment, they inherit identical access permissions. Brennan illustrates this hazard with a concrete scenario: if a code review agent sits right next to a Datadog incident triage bot, the code review agent ends up with unintended access to Datadog credentials, or it might even accidentally edit the memory files of the Datadog bot. As Brennan warns: “So, like there's this co-locating problem quickly runs into issues where agents have access to way more than they necessarily need in order to do their job.”

[09:51](https://www.youtube.com/watch?v=iH_wV8BbS24&t=591s) Kubernetes Pods per Session: Ephemeral Cloud-Scale Sandboxing

To Brennan, the cleanest and most robust architecture for hosting agents is using an ephemeral, highly scalable infrastructure such as Kubernetes. In this model, every single agent session is allocated its own dedicated, short-lived pod. The pod spins up on demand, the agent works against a fresh clone or workspace of the repository, accomplishes its objective—such as opening a GitHub pull request—and then the pod is immediately torn down. This model eliminates the state corruption headaches of persistent VMs, because every run starts from a completely pristine baseline.

```mermaid flowchart TD accTitle: Ephemeral Kubernetes Agent Session Flow accDescr: Incoming triggers spin up a fresh pod per session, which executes its task and tears down completely.

subgraph Triggers ["Inbound Triggers"] T1["Cron Schedules"] T2["HTTP Webhooks (Slack, GitHub, Jira)"] end

subgraph K8s ["Kubernetes Cluster"] Pod["Ephemeral Agent Pod<br/>(Isolated Session)"] Work["Execute task on fresh repo clone"] PR["Open Pull Request / Output Result"] end

Cleanup["Pod Terminated & Workspace Destroyed"]

T1 --> Pod T2 --> Pod Pod --> Work Work --> PR PR --> Cleanup ```

Kubernetes also provides elastic cloud scaling: teams can run hundreds or thousands of agents simultaneously, constrained only by how much CPU and memory they are willing to pay for. Like long-running VMs, a Kubernetes-based setup natively supports automated execution—whether scheduled via Kubernetes cron jobs or triggered dynamically by HTTP webhooks coming from Slack, GitHub, or Jira.

[11:02](https://www.youtube.com/watch?v=iH_wV8BbS24&t=662s) Comparing the Four Isolation Strategies

Brennan synthesizes the tradeoffs across these agent execution strategies by evaluating them across five critical dimensions:

- **Local vs. Remote:** Local execution operates directly on your laptop against your active working tree, whereas remote execution requires the agent to clone down repositories and operate in an independent environment. - **Scale:** Running locally on a workstation maxes out at "ones of agents" before performance suffers, while Kubernetes unlocks cloud-scale concurrency across thousands of parallel workers. - **Level of Isolation:** Running locally with tools like `--dangerously-skip-permissions` leaves the host completely unprotected. Co-locating bots on a VM provides boundary protection from personal machines, but allows agents to step on each other's toes. In contrast, ephemeral containers or Kubernetes pods give every agent its own distinct workspace. - **Level of Persistence:** Local machines and dedicated VMs maintain long-lived system state by default. Ephemeral environments reset across runs, requiring agents to explicitly persist state by committing files or writing to external databases and APIs. - **Triggers:** Local laptop runs are almost always manual, initiated by typing prompts into a terminal. Moving agents into the cloud enables event-driven triggers via schedules and webhooks.

Brennan jokes about the everyday absurdity of local workflows: “Uh, if you've ever like, uh, been like biking home with your laptop open cuz you didn't want Claude Code to shut down, this is a great reason to start moving your agents to the cloud.”

| Strategy | Location | Scale | Isolation Level | Persistence | Triggers | |:--- |:--- |:--- |:--- |:--- |:--- | | **Local (Skip Permissions)** | Local laptop | Low ("ones of agents") | None (full host exposure) | Persistent by default | Manual terminal prompts | | **Local Docker** | Local laptop | Low to moderate | Container boundary; host protected | Ephemeral / bound mounts | Manual prompts / local scripts | | **Dedicated VM / Mac Mini** | Remote | Moderate | Host isolated; agents co-located | High (long-lived state) | Cron schedules & HTTP webhooks | | **Kubernetes Pod per Session** | Remote cloud | High (thousands of pods) | Strong isolation per session | Ephemeral (wiped on exit) | Cron jobs & HTTP webhooks (Slack, Jira, etc.) |

[12:25](https://www.youtube.com/watch?v=iH_wV8BbS24&t=745s) Sandboxes Are Not a Panacea

While sandboxing represents a necessary security baseline, Brennan cautions that it is not an absolute safeguard. Agents can still exploit known vulnerabilities to break free from isolated environments. He cites a real-world example from Anthropic's safety evaluations: “Um, you know, here we we saw during, uh, one when Anthropic was te- testing Mythos, uh, one of the Mythos instances actually managed to break out of its sandbox, gain internet access or doing other things.”

Beyond emerging frontier model capabilities, traditional infrastructure exploits remain a risk. Unpatched container runtimes—such as outdated versions of Docker—have well-documented container escape vulnerabilities that an agent executing shell commands could stumble into or deliberately exploit. Brennan stresses that while sandboxes are an essential first layer of defense to restrict agent actions, teams must still practice defense in depth and exercise care around what network and secret access these environments receive.

[13:07](https://www.youtube.com/watch?v=iH_wV8BbS24&t=787s) OpenHands Agent Canvas and Closing

To address the diverse operational requirements of software development, Brennan concludes with an overview of OpenHands Agent Canvas. The platform is designed to decouple coding harnesses—such as Claude Code, Codex, or the native OpenHands harness—from their underlying runtime environment. Instead of forcing developers into a single rigid architecture, Agent Canvas makes environment isolation configurable with simple toggles:

- Run locally out-of-the-box for rapid development. - Toggle into local Docker containers for basic local isolation. - Route workloads to a remote dedicated VM for background persistence. - Spin up isolated ephemeral pods inside a Kubernetes cluster for scale.

Brennan explains that developer needs shift depending on the task: tight, iterative workflows benefit from working directly against local code files, while long-running autonomous tasks are best handed off to background Kubernetes pods for hours at a time. After presenting Agent Canvas as an easy way to bridge these disparate execution models, Brennan wraps up his presentation to audience applause and opens the floor to questions.

## Notable quotes > [04:52](https://www.youtube.com/watch?v=iH_wV8BbS24&t=292s) The idea is that both agents and humans should only have access to the things that they need in order to do their job — Robert Brennan

## Mentioned Anthropic, ChatGPT, Claude Code, CodeAct, Codex, Cursor, Datadog, Docker, GitHub, GitHub Actions, GitHub Copilot, Jira, Kubernetes, Mac Mini, Model Context Protocol, Mythos, OpenHands, OpenHands Agent Canvas, Robert Brennan, Slack, Twilio

## Video description Running your coding agent with --dangerously-skip-permissions on your laptop puts every file, secret and prod credential you have in reach.

NEXT UP: AI ENGINEER CODE SUMMIT Join us in SF for the second annual AIE CODE Summit, Nov 10–12, our last flagship summit of 2026. Applications live now: https://aie.codes

Robert Brennan, co-founder and CEO of OpenHands, traces AI coding from ChatGPT snippets to local agents and now cloud agents, and argues that sandboxes should follow the principle of least privilege. He compares four real setups: Docker on your laptop, Claude Code in GitHub Actions, a dedicated VM or Mac Mini, and a Kubernetes pod per session. He rates each on local vs remote, scale, isolation, persistence and triggers, covers why sandboxes still aren't a cure-all, and closes with OpenHands Agent Canvas.

In this video: • Why local agents with skipped permissions expose everything you can access • Least privilege for coding agents • Trade-offs of Docker, GitHub Actions, VMs and Kubernetes • The limits of sandboxing, including container escapes

SPEAKER Robert Brennan, Co-founder & CEO, OpenHands X: https://x.com/rbren_dev LinkedIn: https://www.linkedin.com/in/robert-a-brennan

LINKS OpenHands: https://openhands.dev OpenHands (GitHub): https://github.com/OpenHands/OpenHands

CHAPTERS 0:00 Intro and OpenHands 0:57 Evolution of AI-driven development 2:27 Moving agents to the cloud 3:32 Risks of running agents locally 4:52 Principle of least privilege 5:42 Local Docker containers 7:02 Claude Code with GitHub Actions 8:22 Dedicated VM or Mac Mini 9:47 Kubernetes pods per session 11:02 Comparing the four strategies 12:22 Sandboxes are not a panacea 13:07 OpenHands Agent Canvas 13:57 Closing

Recorded at the AI Engineer World's Fair 2026 in San Francisco. Subscribe for more talks from the engineers building with AI.

AI Engineer: https://ai.engineer YouTube: https://www.youtube.com/@aiDotEngineer X: https://x.com/aiDotEngineer LinkedIn: https://www.linkedin.com/company/aidotengineer/

#CodingAgents #AISecurity #AIEngineer

[Source](https://www.youtube.com/watch?v=iH_wV8BbS24)

Reading summary

As coding agents evolve from local developer-paired tools into autonomous, event-driven cloud services, Robert Brennan of OpenHands argues that strict sandboxing grounded in the principle of least privilege is essential to prevent catastrophic security breaches and system corruption. Autonomous Cloud Workflows and Workstation Blast Radii (3:32) Engineering workflows are shifting from manual IDE autocompletion toward autonomous cloud agents triggered by external telemetry, including GitHub pull requests, Datadog alerts, and Slack messages. While developers frequently run command-line agents locally, many bypass confirmation prompts using flags like `--dangerously-skip-permissions` to avoid approval fatigue. Brennan warns that an unconstrained agent runs under the developer's user identity, inheriting full workstation access to local file systems, environment variables, SSH keys, cloud CLI sessions, and reachable production databases or Kubernetes clusters. Applying least privilege requires restricting agent capabilities strictly to the narrow repositories and credentials required for each specific task. Local Docker Containers and GitHub Actions Runners (5:42) To constrain blast radius, early isolation strategies employ ephemeral Docker containers on local machines. This pattern preserves developer workflows—supporting host directory bind-mounts, local browser port forwarding, and Model Context Protocol (MCP) servers—while protecting the host operating system if an agent issues destructive commands like `rm -rf`. However, local containers cannot scale beyond finite laptop resources or reliably process asynchronous cloud webhooks. Moving headless agents like Claude Code into GitHub Actions runners resolves scaling issues and enables scheduled maintenance, such as automated dependency bumps, but enforces rigid vendor lock-in within CI runtimes that cannot natively ingest third-party operational alerts. Dedicated Virtual Machines Versus Ephemeral Kubernetes Pods (8:30) Dedicated virtual machines or physical Mac Minis offer persistent environments capable of listening directly to webhooks from Slack or Twilio. However, Brennan identifies persistent state as a liability that causes configuration drift and requires manual debugging when environments break. Furthermore, co-locating multiple agents on a single VM violates least privilege; a routine code-review agent can inherit unintended access to Datadog credentials or alter the memory files of an adjacent incident-response bot. To resolve this, Brennan advocates spinning up dedicated, short-lived Kubernetes pods per session. Each pod executes against a fresh repository clone, delivers its pull request, and terminates, combining cloud-scale concurrency with complete session isolation. Sandbox Escapes and Defense in Depth (12:25) While sandboxing provides an indispensable baseline, Brennan emphasizes that isolation boundaries are not foolproof. Advanced models can potentially bypass constraints; Brennan points to Anthropic's safety evaluations, where a Mythos instance broke out of its sandbox to gain unauthorized internet access. Furthermore, standard infrastructure vulnerabilities, such as unpatched container escape bugs in outdated Docker runtimes, allow arbitrary shell commands to penetrate host systems. Consequently, sandboxing must function as part of a defense-in-depth architecture that incorporates strict network segmentation and credential governance. To reconcile these architectural trade-offs, Brennan highlights OpenHands Agent Canvas, which decouples agent harnesses from runtime infrastructure so teams can toggle between local runs for tight feedback loops, Docker containers for safety, and Kubernetes pods for asynchronous, cloud-scale autonomy.

Source quotes

[4:52] Robert Brennan: The idea is that both agents and humans should only have access to the things that they need in order to do their job

Original transcript

[0:01] [music] [0:12] >> Uh my name is Robert Brennan. Uh I'm the [0:14] CEO at Open Hands. Uh and I want to talk [0:17] to you a little bit about today about uh [0:19] sandboxing coding agents. Uh why this is [0:21] a really important pattern and [0:23] uh different ways to actually get this [0:24] done. [0:27] Uh a little bit about me. Um like I [0:29] said, I'm the I'm the CEO of Open Hands, [0:31] uh co-founded it a little over 2 years [0:33] ago, really with the vision of bringing [0:35] uh coding agents to the community, [0:37] right? Uh really giving software [0:39] developers a say in the gigantic change [0:41] that's happening to our jobs. [0:43] >> [snorts] [0:43] >> Uh and we started Open Hands as an MIT [0:45] licensed coding agent. Uh and I would [0:47] say now we've we've evolved really to a [0:49] a platform for running coding agents. [0:50] Everything from the harness to the [0:52] infrastructure to the control plane to [0:55] actually like monitor these agents at [0:56] scale. [1:00] Uh a little bit about the history of [1:02] AI-driven development and how we got to [1:03] where we are today and, you know, where [1:05] I think things are going in the future. [1:07] Uh we really started with like uh code [1:09] snippets being generated by a chatbot, [1:11] right? I remember the first time I typed [1:12] in a ChatGPT like, "Write a SQL query [1:14] that does X." and it just like [1:16] one-shotted it and I was blown away. Uh [1:18] that feels very um [1:20] antiquated today. [1:22] Um but uh you know, my my original [1:24] workflow was a lot of like type in a [1:26] ChatGPT, paste something into my IDE, [1:29] hit enter, paste an error message back [1:31] in a ChatGPT. And it's pretty quick that [1:33] I realized like, "Hey, this is kind of [1:34] dumb. I can just like wire some APIs [1:35] together." Uh and very quickly we got uh [1:38] these AI-powered IDEs, stuff like Cursor [1:40] and GitHub Copilot, doing things like [1:42] autocomplete, right? Where now you have [1:44] the context of the code base, you're not [1:46] just generating code snippets inside of [1:47] a chat window, you're actually modifying [1:49] the code itself. You can see the [1:50] variable names that are available there. [1:52] So, the AI gets a little bit smarter, a [1:53] little bit more context-aware. [1:55] And then the big leap in like beginning [1:57] of 2024 [1:59] uh was this leap to agents. So AI that [2:02] wasn't just writing code, but was [2:03] actually running the code that it wrote, [2:05] right? Actually like looking at the [2:07] error messages, Googling them, really [2:09] doing that entire loop of development on [2:11] top of the LLM. [2:12] And that's kind of where we're at today. [2:14] I would say most developers today are [2:15] still they're running something like [2:17] Claude code or open hands [2:19] or code acts on their laptop. [2:23] As a kind of a pair programmer model, [2:25] right? They're manually prompting this [2:26] thing. [2:27] The leap that we're seeing organizations [2:29] make over the course of 2026 is really [2:31] to agents that run in the cloud. And [2:33] this is really where sandboxing comes [2:34] into play. [2:36] One because you know, it needs a place [2:37] to work in the cloud, right? You need to [2:39] give this agent a terminal, a file [2:40] system, etc. [2:42] But two because [2:44] you're really [2:45] you're able to do a lot more once you've [2:47] got these agents in the cloud, right? [2:49] And you need to make sure that they have [2:50] access only to the things that they're [2:52] they're allowed to access [2:53] cuz there's not necessarily going to be [2:55] a human there to babysit them, right? [2:57] Going forward from there, I think the [2:59] more we get agents running in the cloud, [3:00] running autonomously, running you know, [3:03] in response to events coming out of [3:04] systems like GitHub and DataDog and [3:05] Slack rather than being manually [3:07] prompted, you're going to get these [3:08] interactions between agents where like [3:10] one agent opens a PR, another's doing [3:12] code review and they're going back and [3:13] forth. We see these multi-agent teams [3:15] emerging. [3:16] And then I think the end game is really [3:17] this full SDLC automation where you [3:20] know, humans aren't even looking at the [3:21] source code anymore. [3:22] But the really thing I really want to [3:24] talk today about is how do we make this [3:25] leap from from number three where we're [3:27] running agents on our machine to number [3:29] four where we've got agents running in [3:31] the cloud? [3:33] Let's talk a little bit about running [3:35] locally. Who here runs Claude code on [3:37] their laptop or code acts or open hands, [3:39] something some local agent? [3:42] All right. Fewer than I would expect. [3:44] Keep your hand raised if you use [3:45] dangerously skip permissions. [3:47] Yeah, okay. [3:49] Somehow more hands than before. [3:52] So that the is the big trade-off when [3:53] running agents locally, right? Is you [3:55] can either sit there and hit like yes, [3:57] yes, yes, you're allowed to do that over [3:59] and over again and babysit the agent [4:00] while it works, or you can go into [4:02] dangerously dangerous to skip [4:03] permissions mode and just like trust [4:06] that the agent isn't going to delete a [4:08] file you really care about or access [4:09] your production database or anything [4:11] like that, right? Um, so running [4:13] locally, you you are kind of limited by [4:15] those those two options. [4:18] Uh, and if you do run locally and you [4:19] run with dangerously skip permissions, [4:22] uh, the agent does have access to a lot [4:23] of things, right? It has access to your [4:25] whole local file system, uh, it has [4:27] access access to any secrets that are in [4:28] your environment variables, [4:30] uh, it has access to any secrets that [4:31] are in like in your in your home [4:33] directory, [4:34] uh, if you're connected to like a [4:35] production database or a production [4:37] Kubernetes cluster, the agent can get in [4:38] there. It has access basically to [4:40] everything that you have access to, [4:41] right? Um, so super important that you, [4:44] uh, either sit there and babysit it and [4:46] watch what it's doing or you find a way [4:49] to cut off its access and really only [4:51] give it access to the things that it [4:52] needs. [4:54] And this is a this is a paradigm that we [4:56] actually know well from, you know, [4:58] pre-agent security days is the principle [5:00] of least privilege, right? The idea is [5:02] that both agents and humans should only [5:04] have access to the things that they need [5:06] in order to do their job, right? So the [5:08] agent shouldn't have access to every [5:09] secret on your system, it shouldn't have [5:10] access to every file on your system, [5:12] should only have access to the GitHub [5:14] repo that it's editing and maybe a [5:15] couple secrets that it needs to access a [5:17] local database, something like that. Um, [5:19] so it's important when we start to [5:21] sandbox these agents that we're looking [5:22] at what exactly does this agent need in [5:24] order to do its job? And then we can [5:26] create a sandbox that has just exactly [5:28] those things. And then we know that the [5:30] the blast radius of a prompt injection [5:32] attack, uh, or the agent getting [5:34] confused, anything that could go wrong, [5:36] like we we limit the blast radius by [5:38] limiting how much the agent has access [5:40] to. [5:43] So the first strategy that folks tend to [5:45] experiment with is running inside of [5:47] Docker containers on their laptop. This [5:49] is actually the way we originally [5:51] launched Open Hands was as an interface [5:53] where every time you started a new [5:55] conversation with the agent, we'd spin [5:56] up a brand new Docker container. The [5:58] agent would get its own its own [5:59] container. And this this works really [6:01] nicely for several things, right? One, [6:03] it's ephemeral. So, the agent can do [6:04] kind of whatever it wants. If it runs rm [6:06] -rf [6:07] and deletes everything, you just kill [6:09] the container and start again, right? [6:11] It's It's a very nice The agent can can [6:13] just kind of run wild. You don't have to [6:15] worry too much about what it's going to [6:16] do. And because it's running locally on [6:18] your laptop, you can also mount in [6:20] things selectively from your local file [6:21] system, [6:23] you know, like a Git repo. You can mount [6:25] ports so that the agent can run out an [6:27] application and you can view it in your [6:28] browser. You can mount specific secrets [6:30] and environment variables for the agent. [6:32] You can have MCP servers either running [6:34] locally on your laptop or inside the [6:36] Docker container. [6:37] And it's nice because the agent is still [6:39] working with like your local copy of the [6:40] code, right? It's similar to how you're [6:42] used to working where you've got like a [6:43] copy of the code on your workstation. [6:45] And instead of you editing it, the [6:46] agent's editing it now and you're [6:48] deciding when to get pushed and all [6:49] that. But this doesn't really scale very [6:51] well. There's only so many Docker [6:53] containers you can get running on a [6:54] laptop. Your laptop can't like listen [6:56] for events coming out of like Slack and [6:58] DataDog, etc. [7:00] So, this this is pretty limited in terms [7:02] of what you can do here. [7:05] The next strategy we see folks taking is [7:07] starting to like glue together Cloud [7:09] Code and GitHub Actions. This is [7:13] definitely different from like running [7:14] Docker containers on your computer. Now [7:16] you're no longer working with your local [7:17] copy of the code base. You're now, [7:20] you know, having this this agent inside [7:22] of a like an ephemeral environment [7:24] somewhere inside of GitHub Actions, [7:25] cloning the repo, doing stuff, you know, [7:28] and then like shipping it off and then [7:30] everything everything goes away once [7:31] that action spins down. [7:34] But what's nice is that, you know, you [7:35] can run as many GitHub Actions as you're [7:37] willing to pay for. [7:39] Right? It has built-in in for things [7:40] like a secrets registry. [7:42] So, you get these nice these nice [7:44] isolated environments. And what's really [7:45] cool is now you can run them on a [7:47] schedule, right? You can just have a [7:48] GitHub action that spins up an agent, [7:50] you know, every Monday morning at 9:00 [7:51] a.m. and updates your dependencies, [7:53] right? You can have a GitHub action that [7:54] anytime a PR gets opened is going to use [7:56] an agent to do code review. So, you can [7:58] start to get some automation in place [7:59] now that the agents are are off your [8:01] laptop and in the cloud. [8:03] But you're locked in to GitHub actions, [8:04] right? This is a proprietary standard. [8:07] You're not going to be able to really [8:07] port this. [8:09] It's only able to respond to events [8:10] coming out of GitHub, right? You can't [8:12] respond to like a Slack webhook or a [8:13] DataDog webhook. [8:15] So, you're you're kind of limited in [8:17] terms of what you can do by just like [8:19] gluing things together with GitHub [8:20] actions. [8:21] >> [snorts] [8:22] >> The next strategy we saw folks take was [8:24] kind of in the open claw craze where you [8:26] actually get a separate computer, you [8:27] know, a virtual machine in the cloud or [8:29] maybe a Mac mini [8:30] and just put all your agents on that, [8:32] right? This is different from GitHub [8:34] actions in that now you've got a [8:35] long-lived environment. You've got [8:36] persistence, right? Which is good and [8:38] bad, right? You you your agents can [8:40] modify the system and know it's going to [8:42] be that way again when they run, you [8:43] know, 2 days from now. [8:45] But your machine could get into a bad [8:47] state as well and you might have to go [8:48] and debug and figure out what's going [8:49] on. [8:50] You can again you can just like in [8:53] GitHub actions you can run agents on a [8:54] schedule. [8:55] Now since if you're on a running on a VM [8:57] you can actually listen for webhooks [8:59] coming in from [9:00] you know, Twilio if you want to listen [9:02] for text messages from Slack. You can [9:04] listen for incidents coming out of [9:05] DataDog, events coming out of GitHub. [9:08] So, you get agents running automatically [9:10] now. [9:11] But you still have this principle of [9:12] least privilege problem, right? Where [9:14] all of your agents are now like [9:15] co-located in this virtual machine and [9:17] they all have access to the same stuff. [9:19] So, you might have like a a code review [9:20] agent in there alongside of you know, a [9:23] DataDog triage like incident triage bot [9:26] and the code review agent now for some [9:27] reason has access to DataDog and there's [9:28] just a lot more possibility for things [9:30] to go wrong, right? The code review bot [9:32] can even like you know, edit the the [9:34] memory for the DataDog bot. So, like [9:36] there's this co-locating problem quickly [9:39] runs into issues where agents have [9:41] access to way more than they necessarily [9:43] need in order to do their job. So, way [9:45] more opportunities for things to go [9:46] wrong when all these agents are bumping [9:48] into each other. [9:50] >> [snorts] [9:51] >> The fourth and and really like the most [9:52] robust strategy here, I would say is to [9:54] use Kubernetes or some other like, you [9:57] know, highly scalable environment that's [9:59] ephemeral, right? And now you're [10:01] getting, you know, with Kubernetes say [10:03] you get a pod for every agent session [10:05] you want to run. [10:06] Spins up, the agent runs, does its work, [10:09] you know, maybe working on a local copy [10:10] of the of the repo. Then it spins down [10:12] and all that environment goes away, you [10:14] know, the agent has opened up a pull [10:15] request or something like that, right? [10:17] This is really nice because you don't [10:19] have to worry about like the long-term [10:21] state of this thing the way you do with [10:22] a VM. You don't have to worry about it [10:24] getting into a bad state because every [10:25] time an agent runs, you're you're [10:27] basically killing the environment and [10:28] starting fresh. [10:30] And you get like an infinite amount of [10:31] scale, right? You're you have cloud [10:33] scale at this point. You can run as many [10:35] agents as you want as long as you're [10:36] again willing to pay for the memory and [10:38] CPU to run them. [10:41] And again, because it's it's Kubernetes, [10:43] it's running in the cloud. [10:45] You can respond to You can run things on [10:47] a schedule using cron jobs. You can run [10:51] things in response to HTTP events coming [10:53] out of, you know, Slack and GitHub and [10:55] Jira. You can basically run agents fully [10:58] automatically. [11:02] A little kind of like quick comparison [11:04] here. I'll just go down the the the [11:06] things that I look at when I'm comparing [11:07] these different strategies. [11:09] One is is it local or is it remote, [11:11] right? Is it on your on your laptop [11:13] working with your copy of the code base [11:14] or is it running somewhere else that has [11:16] to like clone in the code itself or with [11:18] its own copy. Those are two very [11:19] different ways of working. [11:20] What kind of scale can you get out of [11:22] this thing, right? If you're if you're [11:24] running locally on your laptop, you can [11:25] maybe run ones of agents before things [11:27] start getting uncomfortable. If you're [11:28] in Kubernetes, you can run thousands. [11:30] Level of isolation, right? If you're not [11:33] running if you're running like [11:34] dangerously skip permissions on your [11:35] laptop, you've got nothing. Uh, if [11:37] you've got all your agents like [11:38] co-located in a VM, they're separated [11:40] from your environment, but they can [11:41] still step on each other's toes. But [11:43] something like Kubernetes, uh, every [11:44] agent has its own workspace, you know, [11:46] it's it's doing its own thing. [11:48] Uh, level of persistence. Um, you know, [11:50] you can you can always get some [11:51] persistence by saving files out or like [11:53] writing to external systems. Uh, but [11:55] when you're working on your laptop or [11:56] you're working in a VM, you do get just [11:58] like persistence by default, right? That [12:00] system is long-lived. [12:02] Um, and then what kinds of triggers can [12:04] actually cause these agents to run, [12:05] right? If you're running locally on your [12:07] laptop, it's typically just going to be [12:08] a manual, you're typing in a prompt. Uh, [12:10] once you get into the cloud, you can [12:12] start to run things on a schedule or run [12:13] things in response to events. Uh, if [12:15] you've ever like, uh, been like biking [12:17] home with your laptop open cuz you [12:19] didn't want Claude code to shut down, [12:20] this is a great reason to start moving [12:22] your agents to the cloud. [12:25] Uh, I did want to, uh, touch on the fact [12:28] that sandboxing is not a panacea. Um, [12:30] there is, uh, evidence of agents [12:33] escaping their sandboxes. [12:35] Um, you know, here we we saw during, uh, [12:37] one when Anthropic was te- testing [12:39] Mythos, uh, one of the Mythos instances [12:42] actually managed to break out of its [12:43] sandbox, gain internet access or doing [12:45] other things. There are container escape [12:47] attacks out there. Um, some of them are [12:50] known if you're running an old version [12:51] of Docker, say. Um, so it's not it's not [12:55] perfect. You still have to be a little [12:56] bit careful. Um, but it is it is at [12:59] least a a good first pass at keeping [13:01] agents limited to, uh, what they're what [13:04] they should be doing. [13:07] Um, last I'll give a quick plug for Open [13:09] Hands Agent Canvas. Um, this is a way, [13:12] you know, really to run, uh, with any [13:14] type of sandbox. You can run it with [13:15] Claude code or Code X or the Open Hands [13:17] harness. Um, but we've designed it [13:19] really to, you know, by default if you [13:21] saw it on your laptop, it's like running [13:22] Claude code with dangerously skip [13:23] permissions. But with one quick toggle, [13:25] you can start running things in Docker [13:27] containers. Another toggle, you can [13:28] start running it in a remote VM. Another [13:31] toggle, you can run it inside of [13:32] Kubernetes. [13:33] Um so, it's a really great way to like [13:35] pick the right environment for the job. [13:36] Right? Sometimes you really do want to [13:38] be working with your local copy of the [13:39] code base. You want to be doing that [13:40] quick iterative development back and [13:42] forth with an agent where you're looking [13:43] at the code locally. Sometimes you [13:45] really just want to fire off events [13:46] that, you know, let agents run [13:47] autonomously in the background for a few [13:49] hours. [13:50] Um you really want it running inside of [13:51] Kubernetes or inside of a VM. Um so, [13:53] this is a a great way to kind of move [13:55] between these different types of [13:56] environments. [13:58] Uh that's all I've got, but I'm happy to [14:00] to take questions from the audience. [14:04] >> [applause] [14:20] [music]