Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Modal 6 min read Case study easyNovice

How Ramp built a full context background coding agent on Modal

Ramp Inspect, an internal background coding agent, runs each session in a Modal Sandbox containing a full dev environment (Postgres, Redis, Temporal, RabbitMQ, OpenCode, VS Code server, VNC with Chromium) and now starts roughly half of merged pull requests at Ramp. Fast startup comes from a cron job that clones repos, installs dependencies and builds every 30 minutes, saving diff-based filesystem snapshots so sessions begin from a near-current state in seconds. Modal Dicts handle session locks and image metadata, and Queues route prompts from Slack, web and Chrome extension clients into shared multiplayer sessions, letting the system scale to hundreds of concurrent isolated sessions.

Related posts

  • Building with Modal and the OpenAI Agents SDK

    Modal mediumAdept

    A custom agent harness built on the OpenAI Agents SDK runs coding agents inside Modal Sandboxes, optionally with GPUs, rather than on the host, where an unsandboxed exec tool can be abused by malicious prompts. The harness grows step by step: SQLite-backed Sessions for memory, an orchestrator that delegates to subagents with fresh context windows to limit context rot, and an asyncio-based subagent pool for parallel, non-blocking work. Hooks and a set_status tool let the orchestrator monitor subagents, and per-GPU-type quotas cap spend. Filesystem snapshots are also used to avoid duplicated work. The worked example targets OpenAI's Parameter Golf challenge, with parallel MNIST training as an intermediate test.

  • Agents in the Sandbox

    Railway mediumAdept

    Railway sandboxes now ship Claude Code, Codex, OpenCode and Pi in the default image and can join an environment's private network, which lets agents test against real Postgres, Redis and internal services. The suggested workflow builds a template, configures a sandbox, takes a disk checkpoint, then creates or forks sandboxes from it so parallel agents start from a prepared workspace. Templates are cached builds from shell instructions, checkpoints are server-side disk snapshots that outlive the source sandbox, and forks clone a running sandbox's files but not its processes. TypeScript SDK and CLI examples cover detached agent sessions you can reattach to, port forwarding and a four-agent repo review app.

  • How Legora runs 2,000 parallel agent evals on Modal Sandboxes

    Modal mediumAdept

    Legora tests its long-running legal agent by booting the full application, pinned to a specific commit, inside a separate Modal Sandbox for each eval run. A typical experiment is about 2,000 runs (100 cases × 4 harness variants × 5 trials), all executed in parallel. Modal Volumes snapshot world state such as documents, database state, permissions and blobs, and also cache Docker images. An hourly pipeline pre-builds the image and pre-warms Sandboxes, and moving from gVisor to VM-backed Sandboxes let the team delete their Docker networking and FUSE workarounds. Agents now drive the eval CLI to hill-climb the harness, which helped cut agent cost by 30% through smarter compaction and custom tool search.

  • Container Use for Locally Sandboxed, Background Agents in Zed

    Zed mediumAdept

    Container Use, an open source MCP tool, gives coding agents isolated sandboxes by pairing Dagger containers with Git worktrees, so background agents can work in parallel on the same repo without touching local files. Each agent task gets a randomly named environment that can be inspected with `container-use list`, `watch`, `log`, `diff` and `terminal`, with service tunnels to localhost. The recommended Zed setup uses two custom Agent Panel profiles: a `foreground` profile with all built-in Zed tools enabled and a `container-use` profile with only Container Use tools enabled, so foreground and background agents don't collide.

  • What is an AI code sandbox?

    Modal easyNovice

    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. They run on VMs or containers, ideally with a hardened runtime like gVisor that intercepts syscalls through a user-space kernel instead of sharing the host kernel as runc does. Around that sit filesystem sync APIs, controlled networking, orchestration and state snapshotting. Use cases include background coding agents, code review, chatbot code interpreters, RL reward scoring and AI app builders. Buyers should weigh sub-second cold starts, isolation strength, egress control, high-concurrency scaling, dynamic runtime images and snapshotting.

The quest for software engineering knowledge.

Look:
Layout: