
Heaven vs Vercel Sandbox
On this page
The short version
Vercel Sandbox and Heaven (heaven.dev) both run code in its own Linux VM with root, and the same coding agents come installed on both. Pick Vercel Sandbox when your app starts a microVM per task from TypeScript or Python and should pay only for the CPU the task uses: sessions save their files, start again in about a second, and run in 19 regions beside the rest of your Vercel project. Pick Heaven when an agent or an app should keep running past a session, with its processes and its address: a Computer never times out, its website is private behind sign-in, and a team's Computers share one pool from $20 a month.
Heaven vs Vercel Sandbox features
| Running time and state | Heaven | Vercel Sandbox |
|---|---|---|
| Longest uninterrupted run | YesNo limit: runs until you stop it | 5 minutes by default. 45 minutes on Hobby, 24 hours on Pro |
| When a session ends | Nothing ends it. Disk, processes and address stay | Files are saved. The next session boots a fresh VM and processes start again |
| The same machine next time | YesSame disk, address and running services | YesSame named Sandbox and files, in a new VM |
| Freeze it with memory and processes | YesPause | NoSnapshots keep files, not memory |
| Copy a running machine | YesCopy of its current disk | YesFork from its latest saved snapshot |
| How long saved state is kept | As long as you hold the pool. Snapshots 7 days by default, up to forever | Snapshots 30 days after last use by default, or forever |
| Start time | About 2 seconds to a running Computer, by Heaven's test | Median 0.7 seconds with Drives, by Vercel's figure |
| Cost and limits | Heaven | Vercel Sandbox |
|---|---|---|
| How you pay | $20 a month holds 2 shared vCPUs, 8 GiB and 100 GB for all your Computers | $0.128 an hour of busy CPU, $0.0212 a GB-hour of memory while running, $0.60 per million starts |
| Idle time | Billed like busy time | Memory bills while it runs, CPU only while busy. Stopped costs storage only |
| Free usage | NoNo free tier. First month half price | Hobby quotas, for non-commercial use only. Pro includes $20 of usage a month |
| Machines at once | As many as fit the pool's CPU, memory and storage | 10 on Hobby, 10,000 on Pro |
| Largest machine | Up to the pool's size: 8 GiB on Tiny, 1,024 GiB on the largest plan | 4 vCPUs on Hobby, 8 on Pro, 32 on Enterprise, at 2 GB per vCPU |
| Disk | Shares the pool's storage: 100 GB on Tiny | 64 GB a Sandbox, plus Drives that outlive it |
| Where it runs | Montreal only | 19 regions, with failover on Pro |
| Building on it | Heaven | Vercel Sandbox |
|---|---|---|
| What each machine is | A full Linux VM with root and nested virtualization, from Heaven's Ubuntu image or yours | A microVM with root, from Vercel's Ubuntu image or yours |
| Files that outlive any machine | Each Computer keeps its own disk | YesDrives mount into any session, and read-only Drive snapshots into many |
| A desktop in the browser | YesIn the default image, for people. No API for clicks or screenshots | Install Vercel's screen-relay example |
| Serving and networking | Heaven | Vercel Sandbox |
|---|---|---|
| Who can open the app | Private until shared: people you choose, your organization, a share link or everyone | NoAnyone with the port's URL |
| The app knows who's visiting | YesHeaven signs visitors in and passes their identity in headers | NoYour app handles sign-in |
| The app stays up with nobody working | YesRuns until you stop it, at the same address | NoEnds within 24 hours. Your code resumes it with an SDK call |
| Public TCP ports | YesIncluded, on a shared address or a dedicated IPv4 | NoHTTP and WebSocket only |
| Limit where code can connect | NoNo allowlist, only a cap on egress spend | YesDomain and CIDR rules, down to HTTP method and path |
| API keys kept out of the machine | YesGitHub and HTTPS integrations | YesThe firewall adds credentials to allowed requests |
Who should pick Vercel Sandbox
Vercel Sandbox fits a product that runs generated or untrusted code on request, especially one that already runs on Vercel.
- Pay for the CPU a task uses. Active CPU is billed only while the CPU is busy, so a sandbox waiting on a model's reply mostly pays for memory. Creating one costs $0.60 per million, and Pro runs 10,000 at once.
- Files that come back. A named Sandbox saves its filesystem when it stops and resumes it on the next SDK call, Drives keep data apart from any one Sandbox, and a fork starts from the latest snapshot. Vercel measured a 0.7-second median start with Drives.
- Network rules for untrusted code. The firewall allows or denies by domain and CIDR, can match HTTP method, path and headers, and adds credentials to allowed requests without the code ever seeing them.
- Close to your users and your Vercel project. Sandboxes run in 19 regions with failover on Pro, sign in with the project's own credentials, and come with Claude Code, Codex, OpenCode and Pi installed. Vercel has SOC 2 Type II.
It isn't the fit for a preview teammates sign in to, since an exposed port is open to anyone with its URL, or for work that must keep running past 24 hours.
Who should pick Heaven
Heaven is cloud infrastructure for software factories. It fits when work builds up over days on one machine, and when the apps an agent builds should stay online for reviewers.
- Processes that survive the night. A Computer keeps running with nobody connected, so an agent's dev server, database and caches are where it left them. Pause freezes one with its memory, which a Vercel snapshot doesn't keep.
- Private apps with no login code. Every Computer's website starts private. Heaven signs teammates in and passes their identity to the app in headers, share links open it to a client, and custom domains, public TCP ports, static IPv4 and email work on every plan.
- One pool, one price. Agents and the apps they build share a pool's CPU, memory and storage, the bill stays the same however long they run, and every plan takes any number of members.
- Work you can roll back. A snapshot rolls the same Computer back, a copy starts a new one from any snapshot or a running disk, and Heaven backs up changed disks off-site every hour.
It isn't the fit for code that needs an outbound allowlist, a region outside Montreal or an SDK library. Heaven has none of these.
Pricing
| Plan | Price | What you get |
|---|---|---|
| Heaven Tiny | $20 a month, $10 the first month | 2 shared vCPUs, 8 GiB of RAM, 100 GB of storage and 500 GB of egress, for as many Computers as fit and any number of members |
| Heaven Small | $40 a month | 4 shared vCPUs, 16 GiB, 250 GB and 1,000 GB of egress |
| Vercel Hobby | $0, non-commercial use only | 5 hours of busy CPU, 420 GB-hours of memory, 5,000 starts, 10 Sandboxes at once, 45-minute sessions |
| Vercel Pro | $20 a month per team, $20 per extra deploying seat | $20 of usage a month, 24-hour sessions, 10,000 Sandboxes at once |
Rates are Pro's in Vercel's default region, Washington, D.C. A product's code runs on Pro, since Hobby is for personal, non-commercial use. The bills below give each run or agent 2 vCPUs and 4 GB, and assume its CPU is busy half the time it runs.
Code checks from an app. 1,000 checks a month of 2 minutes each use about $7.09 of Sandbox usage, inside Pro's $20 credit if nothing else on the team uses it. Pro costs $20, the same as Tiny, and a team already on Pro pays nothing more. Vercel is the better tool for this job.
Two build agents and their dashboard. Two agents that work 8 hours a weekday (176 hours a month) use about $74.91 of Sandbox usage, so Pro comes to $74.91 with its credit applied. Agents that mostly wait on a model use less CPU and cost less. A dashboard that stays up all month doesn't fit, because sessions end within 24 hours and port URLs are public, so a team would host it elsewhere. On Heaven the two agents and a 2 GiB dashboard fit in Small for $40 and stay up all month, sharing 4 vCPUs. If the agents' builds overlap with heavy dashboard use, Medium gives them 8 vCPUs for $80.
Frequently asked questions
How long can a Vercel Sandbox session run?
Up to 45 minutes on Hobby and 24 hours on Pro. The default is 5 minutes, and a resumed session starts the clock again.
Does a Vercel Sandbox keep installed packages?
Yes, by default. A stopped session saves its files, and the next session starts a new microVM with them. Running processes start again, from an onResume hook or your own code.
Can I keep a Vercel Sandbox preview private?
Not through its port URLs. Vercel states that anyone with an exposed port's URL can reach it. On Heaven a Computer's website starts private, and you choose who can open it.
Related comparisons
See E2B vs Vercel Sandbox, Heaven vs E2B and the best code sandboxes for AI agents.
- ComparisonE2B vs Vercel SandboxE2B and Vercel Sandbox for an app that runs user or agent code: busy-CPU or allocated billing, pause or saved files, limits and a month of runs.
- ComparisonHeaven vs E2BE2B sandboxes or Heaven Computers for agents and user code: run limits, pause and fork, serving what gets built, and what a month costs on each.
- RoundupBest code sandboxes for AI agents and apps that run user codeCode sandboxes your app or agent starts from an API: how long a run lasts, what survives it, how idle time bills, GPUs and what a month of runs costs.
Run your agents on Heaven
Persistent Linux Computers that share CPU, memory and storage in one pool. Tiny is $20 a month.
Sources and corrections
Spot an error? Email support@heaven.dev with the page, the claim and a source.