---
title: "Sidecars: A low-latency trust boundary for Sandboxes"
description: "Modal Sidecars are isolated containers that run on the same host as a Sandbox, separated by the same gVisor or VM boundary, so trusted code such as agent harnesses, credential injectors and egress proxies can sit next to untrusted agent-generated code."
url: "https://swe.quest/articles/sidecars-a-low-latency-trust-boundary-for-sandboxes-69384814797d352b"
canonical: "https://modal.com/blog/introducing-sandbox-sidecars-trust-boundary"
source: "Modal"
published: "2026-10-01"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 6
tags: ["sandboxing","ai-agents","security","containers"]
---

# Sidecars: A low-latency trust boundary for Sandboxes

A post on [Modal](https://swe.quest/sources/modal.md), published 2026-10-01, 6 min read, Announcement. Original: [https://modal.com/blog/introducing-sandbox-sidecars-trust-boundary](https://modal.com/blog/introducing-sandbox-sidecars-trust-boundary)

## Summary

Modal Sidecars are isolated containers that run on the same host as a Sandbox, separated by the same gVisor or VM boundary, so trusted code such as agent harnesses, credential injectors and egress proxies can sit next to untrusted agent-generated code. Placing the harness in a separate sandbox or control plane adds a network hop to every tool call, and built-in egress controls are not flexible enough for custom needs. Sidecars instead talk to the Sandbox over a local bridge network, measured at 0.58ms p50 and 1.4ms p99 versus 2.6ms and 44ms for HTTPS between separate Sandboxes. They share CPU and memory with the Sandbox, have independent outbound network policies, can force Sandbox traffic through a proxy, and Ramp uses them for a custom egress proxy on its coding agent.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Security](https://swe.quest/tags/security.md) (Security)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)

## Prerequisites

- container isolation basics ([easy posts on Sandboxing & isolation](https://swe.quest/tags/sandboxing.md?difficulty=easy))
- AI coding agents ([easy posts on AI for coding](https://swe.quest/tags/ai-coding.md?difficulty=easy))
- egress proxies ([easy posts on Load balancing](https://swe.quest/tags/load-balancing.md?difficulty=easy))

## Keywords

Modal, Sidecars, Modal Sandboxes, gVisor, Firecracker, lethal trifecta, Ramp Inspect

## Related posts

- [Docker Sandboxes vs. Containers: Choosing the Right Isolation for AI Agents](https://swe.quest/articles/docker-sandboxes-vs-containers-choosing-the-right-isolation-for-ai-agents-9c74485ae65a1b1c.md): Docker · 2026-11-06 · Medium · 14 min read · Sandboxing & isolation, AI agents, Containers, Virtualization, Security
  Containers are isolated processes sharing the host kernel. Docker Sandboxes are microVMs with their own kernel, filesystem, network and private Docker Engine, designed for autonomous coding agents that accumulate state for hours and act on untrusted instructions.
- [The Untrusted Autonomous Workload: How AI Coding Agents Reshape What Isolation Has to Do](https://swe.quest/articles/the-untrusted-autonomous-workload-how-ai-coding-agents-reshape-what-isolation-af433bee97ff8809.md): Docker · 2026-05-26 · Medium · 16 min read · Sandboxing & isolation, Virtualization, AI agents, Containers, Supply chain security
  AI coding agents are untrusted, autonomous workloads that containers were never designed to isolate, so Docker Sandboxes runs each agent in a microVM (custom VMM on Hypervisor.framework, WHP or KVM) with its own kernel and private Docker Engine.
- [What is an AI code sandbox?](https://swe.quest/articles/what-is-an-ai-code-sandbox-ff77320ddef8f884.md): Modal · 2025-07-24 · Easy · 9 min read · Sandboxing & isolation, AI agents, AI for coding, Containers
  AI code sandboxes are ephemeral, isolated environments for executing LLM-generated code so hallucinated packages, crashes or prompt-injected exploits can't affect the host or other tenants.
- [Why AI Agents Need Isolation](https://swe.quest/articles/why-ai-agents-need-isolation-2e7b1a6342af3236.md): Docker · 2026-07-01 · Easy · 9 min read · Sandboxing & isolation, AI agents, Virtualization, Containers, AI for coding
  AI coding agents that run commands, install packages and handle credentials should execute behind an isolation boundary rather than directly on the developer's host.
- [Highlights from AWS re:Invent: Supercharging Kiro with Docker Sandboxes and MCP Catalog](https://swe.quest/articles/highlights-from-aws-re-invent-supercharging-kiro-with-docker-sandboxes-and-mcp-a18d4753910b06e8.md): Docker · 2025-12-12 · Medium · 7 min read · AI agents, Sandboxing & isolation, Containers, AI for coding
  Docker Sandboxes run coding agents like AWS's Kiro inside isolated containers that see only the project directory and none of the host's credentials, while the Docker MCP Toolkit supplies tools through a gateway that injects secrets only into the specific MCP server that needs them.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
