Cloud dev environments for AI agents

Cloud dev environments for AI agents

What an AI coding agent needs from a cloud dev environment: isolation, persistence, credentials, previews and cost. A checklist, with the trade-offs.

20 Nov 20266 min readhomemade team

A coding agent is only as useful as the machine it runs on. Give Claude Code or Codex a real computer with your project running, and it can test its own changes. Give it a locked-down box that forgets everything after five minutes, and it spends its time setting up instead of working.

Dozens of products now promise "a sandbox for your agent" or "a cloud dev environment for AI". They make very different trade-offs. Here is a checklist of what an agent actually needs from its environment, with the questions to ask each provider. We make homemade, one of these products, so we say where we stand on each point, and where others make a different choice that might suit you better.

Two kinds of products

It helps to split the field first.

  • Agent sandboxes. Built to be created and driven by code. Your product starts a sandbox per user session, runs some code in it, reads the result, and throws it away. E2B, Vercel Sandbox, Modal, Daytona and Blaxel mostly sit here.
  • Cloud dev environments. Built for a developer and their agents to work in, on a real repo, for hours or days. Codespaces, Coder and homemade sit here.

The line is blurry, and several products do both. But knowing which one you need answers half the checklist. If you're building an AI product that runs your users' code, you want the first kind. If you want agents working on your own codebase, you want the second.

1. Isolation: what is the agent allowed to break?

An agent runs commands you didn't write. Assume it will, sooner or later, run something destructive. The question is how far the damage can spread.

Isolation comes in three common levels:

  • A container on a shared kernel. Light and fast, but every container on a host shares one kernel.
  • A user-space kernel, like gVisor, which intercepts system calls. Modal offers this as its default runtime, and a VM runtime too.
  • A virtual machine with its own kernel. Most agent-focused products now use some form of microVM. E2B, Vercel Sandbox and Daytona all describe their sandboxes as having their own kernel.

On homemade, every computer is a full VM with its own kernel, its own private network and its own firewall. An agent can install system packages, run Docker, or break its own kernel without touching anything else.

Ask: does each agent get its own kernel? Can it run Docker inside? Who else shares the host?

2. Persistence: what survives a pause?

This is where products differ most, and where agent work goes wrong most often.

An agent's session builds up state: installed dependencies, a warmed-up build cache, a running dev server, a test database with data in it, a shell history. If all of that is gone the next time the agent runs, every task starts with ten minutes of setup.

The options, from least to most kept:

  • Nothing kept. Cloudflare's Sandbox docs say files persist only while the container is active and are deleted when it stops.
  • Files kept, processes not. Many products snapshot the disk when a sandbox stops. Vercel Sandbox snapshots the filesystem on stop by default; boat saves the disk but says memory and running programs are not saved.
  • Files and memory kept. The machine resumes with running processes intact. E2B's pause saves filesystem and memory, and Blaxel's standby snapshots memory, files and running processes. Freestyle also documents pause and resume with memory intact.

homemade is in the third group. A sleeping computer keeps its disk and its memory, so the agent's terminal, the dev server and everything else come back as they were. After an hour asleep, a computer moves to deep sleep: its disk is kept, the processes restart. We explain the details in sleep and wake, explained.

Also check the limits around this. Some products cap how long a session can run (Codespaces has a 12-hour maximum lifetime; Modal's default sandbox lifetime is 5 minutes, up to 24 hours) or how long a stopped one is kept. On homemade, a sleeping computer is kept 7 days on Hobby, 30 days on Pro, or forever with the Unlimited sleep add-on.

Ask: after a pause, does a running process survive? How long is a stopped environment kept? Is there a maximum session length?

3. Credentials: how does the agent sign in?

An agent needs access to a model, to git, and often to other services. Getting this wrong means either pasting tokens into every machine by hand, or giving agents keys they shouldn't have.

Good answers here:

  • Sign in once. On homemade, you sign in to Claude Code, Codex and the other agent CLIs once in your account, with a subscription or an API key, and every new computer starts signed in.
  • Act as the person. Pushes from a homemade computer go out as you, with your own GitHub token, not a shared bot. Webhook-started computers, like pull request previews, use the GitHub App instead, since no person started them.
  • Keep secrets off the machine where you can. Some sandbox products route model calls through a gateway so the real key never enters the sandbox. Runloop's Agent Gateways and microsandbox's design both aim at this. If your threat model includes the agent itself leaking a key, look for this.

Ask: do I sign in per machine or once? Whose identity does the agent push as? Can the agent read the raw key?

4. Previews: can you see what the agent built?

Reading a diff is not the same as clicking through the app. An agent that changed a checkout flow should hand you a link where the checkout runs.

Look for a URL per port, HTTPS, and control over who can open it. On homemade, every service gets a link, shared as public, team only or owner only, and a visit can wake a sleeping computer. Dev servers work without host configuration. We wrote up how those links are built in preview URLs and the 63-character hostname limit.

Ask: does every port get a link? Can I restrict it to my team? What does a visitor see if the machine is asleep?

5. Parallel work: one agent or ten?

The real gain from cloud agents is running several at once. That needs:

  • Cheap new machines. If a new environment takes ten minutes to set up, nobody starts five. Warm starts matter here. We measured ours in how we got click to terminal under 4 seconds.
  • Forking. Copy a machine mid-task to try two approaches. homemade forks a running computer with the same disk and the same running processes. Freestyle, Morph and Daytona also document forking or branching.
  • Concurrency limits that fit. Check how many machines your plan runs at once. On homemade, the free Hobby plan limits how many computers run at once; Pro has no cap.

6. A way in for humans

Agents get stuck. When they do, you want to step in with your own tools: a terminal, an editor, a debugger.

Check for SSH, editor support and a browser terminal. homemade has all three: a terminal and editor in the browser, homemade ssh, and homemade open for VS Code and Cursor. Pure agent sandboxes often expose only an SDK or a web terminal, which is fine for automation and awkward for pairing.

7. Cost: what do idle hours cost?

Agent work is bursty. A typical session is a short burst of work followed by a long wait for review. So look at what an idle environment costs, not only the hourly rate.

  • Per-second billing while running is common now.
  • Some products bill only active CPU. Vercel Sandbox bills Active CPU time plus provisioned memory, for example.
  • Storage while stopped is usually a separate, small charge.

On homemade, a running computer costs a fixed price per hour by size, counted per second, with disk included: from $0.012 an hour (nano) to $0.18 (large). A sleeping computer costs nothing in running time. See pricing.

8. Speed

Raw CPU speed decides how long builds and tests take inside the machine. Very few providers publish numbers, and the ones that exist come from different methods. StarSling runs an open benchmark across many sandbox providers. We ran the V8 Web Tooling Benchmark on our own computers and published the method in benchmarking a cloud computer with V8.

Putting it together

If you are building an AI product that runs untrusted code for your users, an agent sandbox with a good SDK is what you want, and our comparison pages cover the main ones side by side.

If you want your own agents working on your own repo, in parallel, with their state kept and a link to every running app, that's what we built homemade for. Our guide to running Claude Code and Codex in a cloud computer shows the setup step by step.

Try homemade

Every project gets its own cloud computers, with Claude Code and Codex signed in. The Hobby plan is free.

Related posts