In short.
This E2B documentation page explains how JavaScript/TypeScript and Python developers can pause and resume E2B sandboxes. The main catches are that some behaviours are still rolling out region by region and that the page does not say what paused sandboxes cost. A normal pause saves both the filesystem and the memory, so files, running processes and loaded variables come back on resume. Some cases resume by rebooting from disk, without the saved memory: filesystem-only pauses, and the documented recovery and auto-pause fallback cases. These are a snapshot taken while the sandbox was not responding, and a memory auto-pause that the node keeps refusing. A paused sandbox is kept indefinitely until you kill it. The page covers the Running, Paused, Snapshotting and Killed states, the JavaScript/TypeScript and Python calls (pause, connect, kill, list), auto-pause on timeout, and the errors returned when E2B refuses a pause or a resume. It gives timing figures: about 4 seconds per GiB of RAM to pause and about 1 second to resume. It names the SDK versions needed for certain features (2.48.0 and 2.63.0). Nothing was run for this report. Everything below comes from the captured page text, not from testing the service.
Researched and written by an AI model and checked by a second AI model. How it works
This report covers the complete selected page at [https://docs.e2b.dev/sandbox/persistence.md], captured as one file (evidence_b796e7ce-ea51-4c7c-a7cb-22970dd80699). The pages it links to were outside the selected scope and were not read: snapshots, filesystem-only snapshots, fork, auto-resume, resume-without-memory, list, lifecycle events and webhooks, the sandbox lifetime FAQ and the API reference. The page carries no licence or terms notice and states no prices, so rights and pricing are unknown. Nothing was run. The code samples, timings, error codes, SDK version claims and rollout statements are the documentation's own and were not checked against the live service or the SDKs.
The overview
What this resource is
This is a single documentation page, Sandbox persistence, from the E2B documentation site at [https://docs.e2b.dev/sandbox/persistence.md]. It explains how to pause an E2B sandbox and resume it later. A normal pause saves both the filesystem and the memory, so the sandbox resumes in the state it was in, with its files, running processes and loaded variables. Some cases instead resume by rebooting from disk without the saved memory: filesystem-only pauses, and the documented recovery and auto-pause fallback cases.
The captured text is the full selected page (about 19.9 KB). It includes a state diagram, short code samples in JavaScript/TypeScript and Python, a table of how pauses behave when the in-sandbox daemon does not answer, and a limitations section. The page does not name an author, a publication date or a page version.
Overall assessment
As documentation, the page is specific and detailed. It gives exact method names, option names, HTTP status codes, error class names, an error code (sandbox_snapshot_guest_agent_unresponsive) and the SDK versions needed for newer features. It also spends real space on failure cases: a busy node, a hung sandbox, and a snapshot that cannot be resumed with its memory.
Things to weigh: several behaviours are described as rolling out region by region, so what you see may differ from the text. Pricing for paused sandboxes is not given. None of the claims were checked by running code, so this report cannot say whether the service behaves as described.
Who it is for
The audience is developers who use E2B sandboxes through the e2b JavaScript/TypeScript or Python SDK. Pausing lets you suspend execution while retaining sandbox state; any billing effect is unknown from this page. The page does not name use cases itself. It only suggests saving the sandbox ID in your database so you can resume later.
Beginners can follow the basic flow (create, pause, connect, kill) from the short samples. The sections on strict pauses, the guest agent (envd), reboot-on-resume and the lifecycle event fields cover error handling: pauses refused because a node is busy, sandboxes that stop responding, and snapshots that cannot be resumed with their memory. The page does not say who these sections are for. Our interpretation is that they matter most to developers who need to handle these failure cases reliably, for example in long-running deployments. The page assumes you know what an E2B sandbox is and does not explain it.
What it covers and what the feature can do
According to the page, the persistence feature can do the following. It can pause a running sandbox and, by default, save both the filesystem and the memory. It can save only the filesystem with mode 'filesystem' (JavaScript) or mode="filesystem" (Python), which reboots the sandbox on resume. It can resume a paused sandbox with connect(), which resumes automatically if the sandbox is paused. It can list paused sandboxes with Sandbox.list and a state filter. It can remove a paused sandbox with kill, either on the instance or by ID.
It also covers auto-pause. By default a sandbox is killed when its timeout expires. Setting lifecycle onTimeout (on_timeout in Python) to 'pause' makes it pause instead. Auto-pause is persistent, so a resumed sandbox that times out again pauses again. An autoResume option is shown with a default of false, and the page points to a separate AutoResume page for detail.
For hung or busy cases the page describes several tools. There is a strict option on pause (SDK 2.63.0 or later). There are typed errors, ServiceBusyError and GuestUnresponsiveError, with Python equivalents. There is an onResume 'reboot' option on connect (SDK 2.48.0 or later). An envdUnresponsiveAtPause field can be read through the sandbox info call or the REST endpoint GET /sandboxes/{sandboxID}. A sandbox.lifecycle.paused event carries a pause_mode field that shows whether an auto-pause fell back to filesystem-only.
Using it
Requirements
You need the e2b SDK package for JavaScript/TypeScript or Python, and access to E2B's service. Some features need a minimum SDK version. ServiceBusyError and ServiceBusyException, and reboot with onResume/on_resume, need 2.48.0. The strict pause option, the typed GuestUnresponsiveError/GuestUnresponsiveException and the envdUnresponsiveAtPause info field need 2.63.0.
The page does not describe account creation, API keys, supported runtimes, or which plan you need for persistence. The code samples call Sandbox.create() with no credentials shown, so this page does not establish how authentication is set up. The Pro and Hobby tiers are mentioned only for continuous runtime limits, so the page does not say whether persistence is available on every plan.
How it works
The page models a sandbox as four states. Running is active execution that consumes resources. Paused preserves memory and files but cannot execute code. Snapshotting is a brief pause while a persistent snapshot is created, after which the sandbox returns to Running. Killed releases resources and is terminal. Create leads to Running, pause moves Running to Paused, connect moves Paused to Running, and kill moves Running or Paused to Killed.
Before taking a snapshot, E2B checks that envd, the E2B daemon inside the sandbox, answers a health check. If it does not, the sandbox is usually hung, and what happens next depends on the kind of pause. A default pause goes ahead but marks the snapshot as taken while unresponsive, so the sandbox can only be resumed by rebooting from disk. A pause with strict set is refused with HTTP 503, and the sandbox keeps running. A filesystem-only pause is always refused with 503 in this case, because freezing the filesystem needs envd.
A pause can also be refused with 503 when the node is still finishing the previous snapshot of the same sandbox. The sandbox then keeps running with its state intact, and the SDK raises ServiceBusyError. The page says that until this refusal behaviour reaches a region, such a pause fails there with a 500 error instead.
On resume, a snapshot taken while the guest agent was unresponsive is refused with HTTP 409 and the error code sandbox_snapshot_guest_agent_unresponsive. You can then reconnect with onResume 'reboot', which boots from disk. Files flushed before the pause are there, but running processes and in-memory state are gone, and writes not flushed before the pause may be lost. Connecting also does not reset the timeout. It only extends it, to the later of the current expiry and now plus the timeout you pass (default 5 minutes). setTimeout or set_timeout sets an exact value.
Setup and basic use
The page shows a short path in both languages. Create a sandbox with Sandbox.create(). Call pause() on the instance. Store the sandbox ID, for example in your own database. Later, call connect() to resume; it also works on a sandbox that is already running. Call kill() on the instance, or Sandbox.kill with an ID, to remove the sandbox permanently.
To pause on timeout instead of killing, pass a lifecycle object at creation with onTimeout set to 'pause' (on_timeout in Python). You can also pass a timeout value; the page's example uses 10 minutes. To list paused sandboxes, call Sandbox.list with the state filter set to paused and page through the results. This page has no installation command or account setup.
Worked example from the page
The page's retry pattern for a refused pause, in JavaScript: import Sandbox and ServiceBusyError from 'e2b', create a sandbox, then wrap await sbx.pause() in try/catch. If the error is a ServiceBusyError, wait about 5 seconds and call pause() again; otherwise rethrow it. The Python version catches ServiceBusyException, sleeps 5 seconds and calls pause() again. The page notes that ServiceBusyError is not a SandboxError, so you must catch it explicitly.
The page's recovery pattern for a sandbox that cannot resume with its memory: call Sandbox.connect(sandboxId) and catch GuestUnresponsiveError (Python: GuestUnresponsiveException). In the handler, call Sandbox.connect(sandboxId, { onResume: 'reboot' }) (Python: on_resume="reboot"). After the reboot, the page advises pausing again to record a new, healthy snapshot. If the rebooted sandbox reaches its timeout without being paused, it reverts to the snapshot you resumed from, and the next plain connect is refused again. These patterns are paraphrased from the documentation and were not run for this report.
Assessment & evidence
Limitations and catches
Stated limits: a sandbox can run continuously for 24 hours on the Pro tier and 1 hour on the Hobby tier, and the limit resets after a pause and resume. There is no configurable auto-kill after N days, so paused sandboxes never expire on their own. Pausing a sandbox makes any service inside it unreachable and disconnects its clients. After resume the service is reachable again, but clients must reconnect.
Behavioural catches: a default pause on an unresponsive sandbox succeeds but produces a snapshot that cannot be resumed with its memory, so use strict if you would rather retry. Auto-pause on timeout can fall back to a filesystem-only pause. If a node keeps refusing a memory auto-pause for about two minutes past the timeout, the memory state is lost and the next resume reboots the sandbox. The page says this does not happen under normal conditions. Both the refusal handling and this fallback are described as rolling out region by region, so behaviour may differ by region.
Scope limits: the page does not explain filesystem-only snapshots, snapshots, forks or auto-resume in detail. It links to separate pages for them, and those pages were not part of this review. It gives no information on maximum sandbox memory or disk size, how many paused sandboxes you may hold, or which regions have received the rollout.
Reasoning behind the assessment
The page is useful because it states concrete behaviour and failure modes rather than only the happy path. It gives the HTTP codes, the split between error classes (ServiceBusyError is not a SandboxError), the version in which each feature appeared, and exactly how a connect call changes a timeout. A developer can plan error handling directly from it.
Confidence is limited because this is documentation read once, not a tested integration. Some sections say a rollout is in progress without naming regions. The page does not say what happens if the sandbox ID is lost, and it does not compare paused-sandbox retention to other options. Treat the stated timings as approximate figures supplied by the vendor.
Alternatives and related options
The page itself points to other E2B features for related needs. Filesystem-only snapshots give a lighter save that reboots on resume. Snapshots create a persistent snapshot from a running sandbox, which is briefly paused while it is taken. Forks, auto-resume, resume-without-memory and lifecycle event webhooks are also linked. None of these pages were captured, so their details are not covered here.
The selected page does not compare other providers, self-hosted approaches or rebuilding sandboxes from separately stored application state; their costs, tradeoffs and suitability are unknown from this evidence.
Evidence base
The only evidence is the captured text of [https://docs.e2b.dev/sandbox/persistence.md] (evidence_b796e7ce-ea51-4c7c-a7cb-22970dd80699, 19,912 bytes, captured 2026-11-15), which was read in full. The page begins with a pointer to the site's documentation index at [https://docs.e2b.dev/llms.txt]. That index was not captured, and nothing from it is used here.
The documented API behavior, version requirements and timing figures come from this page; assessments and suggested uses are interpretations. No code was run, no E2B account or sandbox was used, and no timing, behaviour or version claim was independently checked. Figures such as 4 seconds per GiB and the two-minute retry window are the documentation's own.
Access & freshness
Costs
The page gives no prices. It does not say whether paused sandboxes are billed for storage, whether pausing or resuming has a charge, or what the Hobby and Pro tiers cost, so cost is unknown from this evidence. The page does say that a Running sandbox consumes resources and that a paused sandbox is kept indefinitely with no automatic deletion. A forgotten paused sandbox therefore stays until you kill it. Whether it keeps costing money is not stated.
The page does give time costs: pausing takes approximately 4 seconds per 1 GiB of RAM, and resuming takes approximately 1 second. For a sandbox with a large memory footprint, a default pause (which saves memory) therefore takes noticeably longer than the resume.
Rights and reuse
The captured page contains no licence statement, copyright notice or terms of use for the documentation text or the code samples, so reuse rights for the page are not established by this evidence. The page documents a service and SDK, but it does not say what licence the e2b SDK packages are distributed under or on what terms the E2B service may be used. Those are unknown here and would need to be checked in the SDK repositories and E2B's terms.
Freshness
The page was captured on 2026-11-15. It shows no publication or last-updated date and no changelog, so its currency can only be judged from its content. It names SDK versions up to 2.63.0 and says the older keepMemory option is deprecated but still works. It also says some behaviour is currently being enabled region by region, which means the text describes a moving target. The wording and the service's behaviour may change without a visible date, so check the live page and the SDK release notes before relying on version-specific details.
Suggested next steps
If you plan to use E2B persistence, read this page alongside the linked pages on snapshots, filesystem-only snapshots, auto-resume and resume-without-memory. Upgrade the e2b SDK to 2.63.0 or later if you want typed GuestUnresponsiveError handling and the strict pause option. Wrap pause calls in retry logic for ServiceBusyError, and decide deliberately between a default pause and a strict one. Store sandbox IDs where you can find them. Add a cleanup job that kills paused sandboxes you no longer need, since none expire on their own.
The page does state continuous runtime limits: 24 hours on the Pro tier and 1 hour on the Hobby tier, reset after a pause and resume. Before committing, confirm these with E2B directly: pricing for paused sandboxes, whether persistence is available on your plan, any plan limits beyond those runtime limits, and the licence terms. The page does not state any of them, so they remain unknown. Then test pause and resume timing with your own memory sizes, and check whether your region already has the refusal handling and the auto-pause fallback.
