Lifo vs Modal Sandboxes
Modal Sandboxes are secure containers on Modal's cloud, isolated with gVisor or a VM, with GPUs and fleets of thousands at once. Lifo runs code in the user's browser tab, so a preview or an agent's shell costs nothing per session. One is built for scale on servers, the other for running where the user already is.
At a glance
Modal Sandboxes are "secure containers for executing untrusted code on Modal." They run custom container images, isolated with gVisor by default or in a virtual machine with its own Linux kernel, across several clouds. Modal pitches them as "trusted infrastructure for untrusted agents," with SDKs for Python, JavaScript and Go.
A small Linux-like operating system written in TypeScript. It boots in milliseconds inside the user's browser tab or a Node.js process: a filesystem, a bash-like shell, processes, ports and a Node.js runtime, with no VM or emulator underneath. Open source under MIT, with Lifo Cloud for apps that must keep running.
Lifo and Modal Sandboxes side by side
| Feature | Lifo | Modal Sandboxes |
|---|---|---|
| Where code runs | The user's browser tab (in the page or a Web Worker), or your Node.js process. Lifo Cloud, in preview, keeps a box running on Lifo's servers. | Modal's cloud, which runs containers across multiple clouds. You can pin a region at a price multiplier. |
| Isolation | Boxes are kept apart from each other, not from the page or process that runs them. Untrusted code needs a Web Worker on a separate origin. Security docs | gVisor by default; a VM runtime with its own Linux kernel is also available. GPU sandboxes use gVisor. |
| What runs | A Node.js compatibility layer with npm, Vite, Express, Expo previews, git, a bash-like shell, Python (Pyodide), Postgres (PGlite) and a Supabase-compatible backend. No Linux binaries or native addons. | Any custom container image, including Dockerfile commands. Ports exposed as encrypted or unencrypted tunnels on w.modal.host subdomains. GPUs, including RDMA-enabled ones. |
| Cold start | About 27 ms in a browser tab, under 1 ms in Node.js (measured with the repo's bench/). | Modal says sandboxes "start in under one second" and that it can start over 10,000 a second. Add the network round trip. |
| Cost model | $0 in the browser: the user's device does the work. Lifo Cloud bills by usage: a Lite box is $0.005 an hour while awake. | Starter is $0 plus compute with $30 a month of credit; Team is $250 a month plus compute. Sandboxes bill at 3x list: $0.00003942 per physical core (2 vCPU) per second and $0.00000667 per GiB-second, on max(request, usage). |
| Open source | Yes. @lifo-sh/core, @lifo-sh/ui and the CLI are MIT licensed. Lifo Cloud's servers are closed source. | The client SDKs are Apache-2.0 on GitHub. The platform is a hosted service. |
| In your product | An npm package (@lifo-sh/core) plus terminal, file explorer and preview components (@lifo-sh/ui), or an iframe of the playground. | Create sandboxes from your backend with the Python, JavaScript or Go SDK, then show an exposed port's tunnel URL in your app. |
| Offline | Yes, once loaded, apart from what needs the network (npm installs, git push). | No, it's a cloud service. |
| Session length | As long as the tab is open. A Lifo Cloud box sleeps when idle and keeps its files and database. | Default maximum lifetime of 5 minutes, configurable up to 24 hours. Filesystem snapshots are kept 30 days by default; memory snapshots, in alpha, 7 days. |
| Concurrency | No limit from Lifo in the browser: each user's device runs its own boxes. | 250 concurrent sandboxes on Starter, 10,000 on Team, custom on Enterprise. |
Modal Sandboxes's column comes from its official docs and pricing pages, checked on 29 November 2026; prices change, so follow the Modal Sandboxes pricing page for current numbers.
Built for scale, or built for the tab
Modal Sandboxes are containers on Modal's cloud, isolated with gVisor or, since September 2026, an optional VM runtime. They take any image, can attach GPUs, and Modal says it can start them at over 10,000 a second. Customers it names include Cognition, Linear and Ramp, for coding agents and reinforcement learning rollouts.
Lifo is a Unix-like system written in TypeScript that boots in about 27 ms in the user's browser tab or in your Node.js process. It runs Node.js, npm, Vite, Express, Expo previews, git, Python through Pyodide and Postgres through PGlite, for $0 per session. It doesn't run Linux binaries or GPUs, and it isn't a security boundary.
What it costs
Modal bills sandboxes at its non-preemptible rate of 3x list price: $0.00003942 per physical core per second (a core is two vCPUs) and $0.00000667 per GiB-second of memory, charged on the larger of what you request and what you use. That's about $0.14 per core-hour and $0.024 per GiB-hour. Starter includes $30 of credit a month; Team is $250 a month with $100 of credit. Pinning a region multiplies the price by 1.15 to 1.75.
A Lifo box in the browser costs $0, whatever the number of users. Lifo Cloud, in preview, bills a Lite box at $0.005 an hour while it's awake and nothing while it sleeps.
Security
Modal isolates each sandbox with gVisor or a microVM, can block all outbound network access, and reports SOC 2 Type II, with HIPAA on Enterprise. It is built for code you don't trust.
A Lifo Sandbox keeps programs apart from each other, not from the page or process that runs it. That's fine for code written for the user who's watching; for untrusted code, use a WorkerSandbox on a separate origin, or a container or VM service like Modal. See the security docs.
Which one to choose
Choose Modal Sandboxes when
- You run agents or rollouts by the thousand, on servers, with nobody watching each one.
- You need GPUs, custom images or Linux binaries.
- The code isn't trusted and needs gVisor or a VM around it.
- Your backend is already in Python on Modal.
Choose Lifo when
- Each user needs a live preview, a playground or an agent shell, and you don't want a container per session.
- The code runs for the person watching it, and starting in milliseconds matters.
- You want it inside your page, or offline, with an MIT runtime.
- You build web or mobile apps: Vite, Express, Expo and a Supabase-compatible backend run in the tab.
Using both. Keep interactive sessions in the user's tab with Lifo, and send batch work, GPU jobs and untrusted code to Modal.
Questions
- How much do Modal Sandboxes cost?
- As of 29 November 2026, sandboxes bill at 3x Modal's list rates: $0.00003942 per physical core (2 vCPU) per second and $0.00000667 per GiB-second of memory, on max(request, usage). Starter includes $30 of credit a month; Team is $250 a month with $100 of credit. See Modal's pricing page for current numbers.
- How long can a Modal Sandbox run?
- The default maximum lifetime is 5 minutes, and you can set a timeout of up to 24 hours.
- Can Lifo run on GPUs like Modal?
- No GPU compute in a box. Lifo's in-browser agent can run a model with WebLLM on the visitor's GPU through WebGPU, which is a different thing from server GPUs.
- Which is better for a coding agent?
- If the agent writes web or mobile apps for a user who's watching, Lifo runs the shell, dev server and preview in the tab at $0. If agents run unattended at scale, need Linux tools or run untrusted code, Modal is built for that.
Related comparisons
Sources
Facts about Modal Sandboxes come only from its own website, docs and pricing pages. If something here is out of date, open an issue and we'll fix it.
- Modal docs: Sandboxes, checked on 29 November 2026
- Modal pricing, checked on 29 November 2026
- Modal: Sandboxes use case, checked on 29 November 2026
- Modal docs: Sandbox snapshots, checked on 29 November 2026
- Modal docs: Sandbox networking, checked on 29 November 2026
- Modal docs: Security, checked on 29 November 2026
- Modal docs: Region selection, checked on 29 November 2026
- Modal changelog, checked on 29 November 2026
- modal-labs/modal-client on GitHub, checked on 29 November 2026
- Lifo docs: Why Lifo
- Lifo docs: Security and isolation
- Lifo docs: Limitations
- Lifo docs: Performance
- Lifo pricing
See it run in your browser
A shell, Node.js, npm and a dev server, booted in the tab. No account and no server.