Sandbox providers
Compare sandbox backends and see which behaviors differ from a user's point of view.
This page compares the sandbox providers a deployment can run on: the operator picks one (sandbox_provider in the deployment configuration) for every session, and each runs the same sandbox runtime but differs in how sandboxes start, how saved state is kept, and which sandbox settings it honors.
Which provider am I on?
Users cannot switch providers from the app. Settings › Sandbox names the provider when it cannot honor a field, for example "Per-session CPU and memory overrides are unavailable for daytona; resources are configured by the deployment." A timeout-only note ("Per-session timeout overrides are unavailable for ...") appears on Daytona as well. The resources note also appears on EC2. No note means Modal, modal-vm, Vercel Sandboxes, or Boat; ask your operator which one.
Comparison
| Modal | modal-vm | Daytona | Vercel Sandboxes | E2B | Boat | |
|---|---|---|---|---|---|---|
| Startup model | Fresh sandbox from the base runtime image | Fresh Docker-capable Modal VM sandbox | Persistent sandbox created from a base snapshot | Fresh sandbox from a base-runtime snapshot | Fresh sandbox from a managed template | Persistent full-VM sandbox deployed from a saved snapshot |
| Saved-state model | Filesystem snapshot restore | Filesystem snapshot at shutdown, then restore | Persistent sandbox: stopped on inactivity or stale heartbeat, then started again | Filesystem snapshot at shutdown, then restore | Persistent sandbox: paused on inactivity, resumed on the next prompt | Persistent sandbox: archived on inactivity, resumed on a new machine |
| Prebuilt images | Yes (Modal image) | Yes (Modal VM image) | Yes, once the operator opens admission (snapshot) | Yes (snapshot) | Yes (snapshot) | Yes (saved snapshot) |
| CPU and memory settings | Yes | Yes | No | Yes, mapped to vCPUs | No | Yes, mapped to the smallest machine size that fits |
| Sandbox timeout setting | Yes | Yes | No | Yes | Yes | Yes |
| Default sandbox lifetime | 2 hours; configurable | 2 hours; configurable | Persistent sandbox; the timeout setting is not honored | 45-minute sandbox lifetime; image builds capped at 35 minutes | Operator-set TTL (default 2 hours; about 1 hour on the Hobby tier); auto-pause at TTL | 2 hours; configurable up to 30 days; archived at the deadline |
"Yes" for CPU and memory means the cpuCores and memoryMib fields under Settings › Sandbox take effect. On providers marked "No", those fields are dropped from the session's effective settings. The same applies to sandboxTimeoutMs where the timeout column says "No". The settings page hides the fields the current provider cannot honor.
Saved state matters for follow-up prompts: after confirmed shutdown, Modal, modal-vm, and Vercel can restore a saved snapshot into a new sandbox. Daytona, E2B, Boat, and EC2 resume the retained sandbox in place.
The two saved-state models side by side:
Modal
- Sessions start from the base runtime image and can restore from filesystem snapshots taken after completed turns (including failed executions) or at shutdown. The default Modal image does not include Docker.
- Prebuilt images are stored as Modal images and follow the shared build lifecycle.
- CPU, memory, and sandbox timeout settings all apply.
modal-vm
- Docker Engine and Compose are available on this Modal VM backend, not on default Modal or the other backends.
- Session snapshots require shutdown, so per-turn snapshot requests are skipped; capture is attempted when the sandbox shuts down. Follow-ups can then restore saved state in a new sandbox.
- Prebuilt images, CPU, memory, and sandbox timeout settings are supported.
Daytona
- Sandboxes are persistent. On inactivity or a stale heartbeat the control plane stops the sandbox, and the next prompt starts the same sandbox again.
- Prebuilt images are captured as snapshots from a stopped build sandbox. New builds and prebuilt-image boots are admitted only after the operator opens admission (
daytona_prebuilds_enabled, off by default). Until then Settings › Images and Settings › Environments show "Prebuilds are paused for this deployment"; toggles still record intent and existing images keep working. - CPU, memory, and sandbox timeout settings are not honored; sandbox memory is inherited from the deployment's base snapshot.
Vercel Sandboxes
- Fresh sessions start from a base-runtime snapshot the deployment builds, or from a prebuilt-image snapshot when one matches.
- Saved state is a filesystem snapshot; per-turn snapshot requests are skipped because capturing requires shutdown. Inactive sessions are snapshotted and stopped.
cpuCoresis the requested vCPU count andmemoryMiba minimum memory request converted at 2 GB per vCPU. Requests between supported sizes (1, 2, 4, or 8 vCPUs) round up; requests above 8 vCPUs or 16 GB fail with a provider error. With both fields unset, Vercel's default (2 vCPU, 4 GB) applies.- OpenInspect caps Vercel sandboxes at 45 minutes (also compatible with Vercel Hobby), so image-build execution is capped at 35 minutes to leave room for finalization.
E2B
- Sessions start from a managed template. Idle sessions are paused after the shared inactivity timeout (10 minutes by default) rather than destroyed, and the next prompt resumes the paused sandbox with its workspace intact. If E2B has dropped the sandbox in the meantime, a fresh one is spawned.
- The sandbox TTL is set by the operator (2 hours by default; the E2B Hobby tier caps runtime at about 1 hour). With auto-pause on, reaching the TTL pauses the sandbox instead of killing it. Agent activity inside the sandbox does not extend the TTL.
- Prebuilt images are snapshots of a build sandbox and boot like any other session.
- The sandbox timeout setting applies; CPU and memory settings do not. Template size is set by the operator.
- E2B sandboxes take every model API key from Settings › Secrets; there is no deployment-wide key.
Boat
- Sessions run in full Ubuntu virtual machines deployed from a saved snapshot the deployment builds. Idle sessions are stopped after the shared inactivity timeout (10 minutes by default): the disk is snapshotted and the machine released. The next prompt resumes the same sandbox on a new machine with its files intact. Boat keeps a stopped sandbox's disk for 14 days; after that, or if Boat has lost the sandbox, a fresh one is spawned.
cpuCoresandmemoryMibselect the smallest Boat machine size that satisfies both (small2 vCPU/4 GB,default4/8,large8/16,xlarge16/32, the last on plans that offer it). With both unset, the operator's default size applies. The sandbox timeout setting applies and becomes Boat's auto-stop deadline.- Prebuilt images are not available; every session starts from the base snapshot and runs
setup.shon its first boot. - Ports 22, 6080, 8090, 8911, and 47984–48010 belong to Boat; the VNC port defaults to 6081 on Boat, and a service or tunnel configured on a Boat port fails the spawn.
- Tunnel URLs carry an access token in their query string; treat them like passwords.
- A stop keeps
/homeand system changes, not/tmpor~/.cache. Files an agent writes under/tmpare gone after a resume on a new machine and tool caches are rebuilt; the runtime keeps its own state under the home directory, so the conversation and the Changes baseline survive. - Sandboxes billed to a Boat organization start shared with every organization member, and the provider makes them private right after they are created. Boat's create call has no visibility option, so the sandbox is shared for that one request; set the organization's default visibility for new sandboxes to private to close the window. An image build's sandbox receives the scope's secrets only after it is private.
- Boat sandboxes take every model API key from Settings › Secrets; there is no deployment-wide key.
- Prebuilt images are Boat saved snapshots and share the account's saved-snapshot allowance with the deployment's base snapshot. A build past the allowance fails with
credit_required; the operator removes unused snapshots or adds credit. See Prebuilt images.
EC2
- Each session runs in its own EC2 instance in the deployment's AWS account, launched from a base AMI the operator builds. Available only when the control plane itself runs on AWS (the Node host), not on Cloudflare.
- Idle sessions are stopped after the shared inactivity timeout: the instance's disk is kept and the next prompt starts the same instance with its workspace intact. If the instance is gone, a fresh one is spawned.
- No preview URLs: code-server, the web terminal, VNC, and tunnel ports are not available. Prebuilt images and Docker are not available either; every session runs
setup.shon its first boot. - The sandbox timeout setting applies; CPU and memory settings do not. The instance type is set by the operator.
- EC2 sandboxes take every model API key from Settings › Secrets; there is no deployment-wide key.
Provider setup
Provider selection and credentials are operator tasks documented in the repository:
- Getting started (all providers)
- Vercel Sandbox provider
- E2B sandbox provider
- Boat sandbox provider
- EC2 sandbox provider
- Daytona prebuilds and admission
When switching providers, keep the previous provider's credentials configured until its pending image cleanup has drained; cleanup runs against the provider each build was recorded on.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| CPU, memory, or Session Timeout fields are missing from Settings › Sandbox | The provider does not honor them; values stored earlier are kept | Nothing to fix in the app. Resources or timeouts are set by the deployment; ask the operator. |
| Settings › Images shows "Prebuilds are paused for this deployment" | Daytona with daytona_prebuilds_enabled off (the default) | Toggles still record intent. The operator opens admission; see the Daytona link under Provider setup. |
| A Vercel session fails to start after raising CPU or memory | Requests above 8 vCPUs or 16 GB are rejected by Vercel | Lower cpuCores or memoryMib under Settings › Sandbox. |
| A Boat session fails to start naming a reserved port | A service or tunnel port is one Boat's own services hold | Move the port off 22, 6080, 8090, 8911, and 47984–48010 under Settings › Sandbox. |
| An image build on Vercel times out before the configured build timeout | Vercel caps image-build execution at 35 minutes | Shorten setup.sh; environment builds run one setup script per repository. |
Next steps
MCP servers
Give agents extra tools by registering local or remote MCP servers, routing remote ones through OpenInspect with shared or per-user credentials, scoping them to repositories, and keeping local servers fast to start.
Choosing a model and reasoning effort
Enable models for your workspace, pick a model and effort in the composer, and understand which credential each provider needs.