Back to Infrastructure
infrastructureL3 SystematicAgent Runtime & Sandboxing

Pre-warmed containers with codebase

Pre-warmed containers are agent environments that have been prepared in advance and are waiting in a ready state before any task is assigned to them.

  • ·Isolated agent environments (devbox model) prevent agents from accessing other projects
  • ·Pre-warmed containers with codebase at HEAD and dependencies installed are available
  • ·Network isolation prevents agents from reaching production systems
  • ·Container warm pool size matches team's agent usage patterns
  • ·Network isolation rules are tested and audited quarterly

Evidence

  • ·Devbox configuration showing per-project isolation boundaries
  • ·Pre-warmed container pool metrics (pool size, warm hit rate, cold start rate)
  • ·Network policy configuration (Kubernetes NetworkPolicy, firewall rules) blocking production access

What It Is

Pre-warmed containers are agent environments that have been prepared in advance and are waiting in a ready state before any task is assigned to them. Instead of creating a container from scratch when a task arrives (pull image, start container, clone repo, install dependencies - 60-180 seconds), you maintain a pool of containers that have already completed this initialization. When a task arrives, it is assigned to a pre-warmed container immediately, with startup overhead measured in seconds rather than minutes.

The preparation work happens asynchronously in the background, driven by webhooks or scheduled jobs. When a developer pushes to a branch, the CI system creates a pool of pre-warmed containers checked out to that commit, with dependencies installed and the codebase ready. When an agent task is submitted, it is handed a pre-warmed container from the pool, given its task-specific credentials, and starts executing immediately. The container that just received a task is replaced in the pool by a new pre-warmed container being prepared in the background.

The codebase cloning and dependency installation steps are the main startup cost drivers. A large monorepo can take 2-5 minutes to clone. A Node.js project with a large node_modules can take 3-10 minutes to install. Pre-warming eliminates both costs from the critical path. The agent task starts with a container that already has main cloned and npm install completed - all the developer sees is near-instant task start.

Pre-warming requires infrastructure investment: a pool manager that maintains the right number of containers for anticipated load, a mechanism to keep pools current as commits are pushed, and storage for the container pool state. But the payoff - startup times that match interactive developer expectations - is what makes autonomous agent workflows practical at scale. Stripe's public benchmark of 10-second devbox spin-up is achieved through pre-warming; cold-start containers cannot reach that number.

Why It Matters

  • Startup time determines whether developers wait or move on - a 3-minute devbox startup breaks developer flow; a 10-second startup is transparent; the difference in perceived latency determines whether developers use the infrastructure or work around it
  • Pre-warming amortizes expensive operations - codebase cloning and dependency installation happen once per pool refresh rather than once per task; for large codebases and dependency trees, this is a 10-100x reduction in per-task overhead
  • Pool management enables resource planning - maintaining a pool of pre-warmed containers provides a clean abstraction for capacity planning: you know exactly how many containers are available, how many tasks they can absorb, and when to scale the pool
  • Warm state includes build artifacts - pre-warmed containers can include pre-built artifacts (compiled binaries, transpiled JavaScript, populated build caches) that further accelerate task execution beyond just codebase presence
  • Enables responsive multi-agent dispatch - when a developer dispatches 5 parallel agent tasks, all 5 should start within seconds; without pre-warming, dispatching 5 tasks means 5 parallel 3-minute initializations before any work begins

Getting Started

6 steps to get from here to the next level

Common Pitfalls

Mistakes teams actually make at this stage - and how to avoid them

How Different Roles See It

B
BobHead of Engineering

Bob's team has adopted the devbox model and it is working, but developers are complaining about wait times. Spinning up a devbox for a new task takes 3-4 minutes, which is long enough that developers frequently switch to other work and lose context. Bob wants to improve the experience but does not know if the infrastructure investment in pre-warming is worth it.

What Bob should do - role-specific action plan

S
SarahProductivity Lead

Sarah is tracking agent task throughput and has noticed that developers run fewer agent tasks than expected. When she interviews developers, a consistent theme emerges: "by the time the devbox is ready, I've already moved on to something else." The 3-minute startup is enough friction to prevent developers from using agents for small tasks that do not feel worth the wait. Pre-warming would unlock a category of quick agent tasks that are currently underused.

What Sarah should do - role-specific action plan

V
VictorStaff Engineer - AI Champion

Victor has been benchmarking devbox performance and knows that the cold-start time on the team's current setup is 4 minutes. He has read about Stripe's 10-second benchmark and has a clear theory about how to achieve it: a pre-warmed pool combined with a snapshot-based image that includes the repository at HEAD with dependencies installed. He estimates 2 days to prototype and 1 week to productionize.

What Victor should do - role-specific action plan