# Best ways to keep agent files across sandbox restarts (2026): disks, pause, volumes and memory stores

Source: https://archil.com/compare/best-ways-to-persist-agent-files-across-sandbox-restarts

Agents losing their working files when the sandbox restarts? The options compared: an Archil disk or Archil sandbox, E2B pause, Daytona and Vercel Sandbox persistence, Modal Volumes, Claude Managed Agents memory stores, and syncing to a bucket yourself. What each keeps, for how long, file size limits and what it costs.

[All comparisons](https://archil.com/compare)

# Best ways to keep agent files across sandbox restarts (2026)

Agents lose files on restart because they write to the sandbox's own disk, which goes away with it. Move the working files onto storage that outlives the sandbox. An Archil disk does that on any provider: mount it in E2B, Daytona, Modal or Vercel sandboxes, or run Archil sandboxes, whose root filesystem is itself a durable disk, so installed packages survive too. If you're staying on one provider, turn on its persistence first: E2B's pause, Daytona and Vercel Sandbox's stop. Memory stores such as Claude Managed Agents' hold small text notes, not repositories or databases.

Updated November 2026. Competitor facts are from each vendor's own docs and pricing pages.

## The short list

1.  [Archil](#archil): Best for agents whose whole workspace, packages included, must survive every kind of restart, on any sandbox provider
2.  [E2B pause](#e2b-pause): Best for agents already on E2B that pause between turns and need memory, processes and files back
3.  [Daytona](#daytona): Best for development environments that stop when idle and come back with their files
4.  [Vercel Sandbox](#vercel-sandbox): Best for agents in Vercel apps that need files and packages back after a stop
5.  [Modal Volumes](#modal-volumes): Best for agents that already run on Modal, especially with GPUs
6.  [Claude Managed Agents memory stores](#claude-managed-agents-memory-stores): Best for small text notes an agent on Claude Managed Agents should remember between sessions
7.  [Sync to a bucket or git yourself](#sync-to-a-bucket-or-git-yourself): Best for small workspaces where losing the last few minutes of work is acceptable

## Side by side

| Option | What it keeps | Survives sandbox deletion | Limits | Shared across sandboxes | Pricing basis |
| --- | --- | --- | --- | --- | --- |
| Archil | Everything under the mount; in Archil sandboxes, the whole root filesystem, and memory on pause | Yes, for mounted disks | No size cap on paid plans (10 GB per disk on Free) | Up to 5,000 clients per disk, on any provider | $0.20 per GiB-month of active data; external mounts from $10 a month |
| E2B pause | Filesystem and memory of a paused sandbox, with no time limit | No | Sandbox disk 10 GiB on Hobby, 20 GiB on Pro | No; Volumes in private beta | No compute billed while paused |
| Daytona | Filesystem of a stopped sandbox; volumes | Volumes only | Sandbox disk 10 GB max; 100 volumes per organization | Volumes, last write wins | Volumes free; stopped sandboxes bill reserved disk |
| Vercel Sandbox | Filesystem snapshot on stop; Drives | Drives only | Snapshots expire 30 days after last use by default | Drives: one writer | Snapshot and Drive storage |
| Modal Volumes | Files on the Volume | Yes | v1: 500,000 inodes; v2 no file limit | Yes; readers reload, last write wins | Per GiB-month after a free allowance |
| Claude Managed Agents memory stores | Text documents under `/mnt/memory/` | Yes | 100 KB per memory, 10,000 memories per store | Yes, read-write or read-only, across sessions | No separate fee listed; sessions bill $0.08 per session-hour plus tokens |
| Sync to a bucket or git yourself | Whatever your script copies, when it runs | Yes | Your bucket's limits | Through the bucket | Object storage and requests |

## What to look for

-   ### What survives which event
    
    A restart can be a clean stop, a pause, a timeout, a crash or a deleted sandbox. Most built-in persistence covers the first two. Only storage outside the sandbox survives all of them.
    
-   ### Whole workspaces, not notes
    
    Agents work on repositories, `node_modules`, datasets and SQLite files. Check the size and type limits: some stores take text files of a few kilobytes, others a full file system.
    
-   ### Installed packages too
    
    Mounting a volume at `/workspace` keeps what's under it, but packages installed into the sandbox's own root filesystem still disappear unless the platform keeps that too.
    
-   ### When a write is safe
    
    Some platforms acknowledge writes from local NVMe and copy them to durable storage later; a crash can lose writes that `fsync` already confirmed. See [when is a write safe?](https://archil.com/guides/evaluating-storage/when-is-a-write-safe)
    
-   ### How long it's kept
    
    Saved state can expire: snapshots after 30 days on several platforms, archived sandboxes after a week stopped. Storage you own lasts until you delete it.
    
-   ### Who else can read it
    
    The next sandbox, a parallel agent, your backend, or a person reviewing the work. Files inside a stopped sandbox are reachable only by starting it again.
    

## Each option in detail

### 1. Archil

[docs.archil.com](https://docs.archil.com/compute/sandboxes/introduction#root-filesystem-and-mounted-disks)

**Best for:** agents whose whole workspace, packages included, must survive every kind of restart, on any sandbox provider

Mount an Archil disk where the agent works and its files outlive the sandbox: stop, timeout, crash or deletion. The disk mounts over FUSE in E2B, Daytona, Modal, Vercel Sandbox, Blaxel, Fly.io Sprites and Cloudflare Containers, so the next sandbox, on any of them, picks up the same files. In an [Archil sandbox](https://archil.com/product/sandboxes), the root filesystem is itself an Archil disk, so installed packages and toolchains survive stop and start, and pause also keeps memory and running processes.

#### Strengths

-   Survives sandbox deletion and hardware failure: a write is durable when `fsync` returns
-   One disk mounts read-write on up to 5,000 clients, and your backend reads it over S3
-   Moves with you between sandbox providers
-   Fork a workspace per attempt with a branch in about 33 ms

#### Tradeoffs

-   In another provider's sandbox, only files under the mount persist; packages installed on that sandbox's root filesystem still go away
-   Mounting outside Archil needs the Developer plan ($10 monthly minimum), and data read out to external compute costs $0.07 per GB
-   Archil sandboxes pause after a 24-hour session (30 minutes on Free), and run only in three AWS regions or with BYOC
-   Serverless `exec` calls on a disk stop after 5 minutes; use a sandbox for longer work

### 2. E2B pause

[e2b.dev](https://e2b.dev/docs/sandbox/persistence) · [Archil vs E2B](https://archil.com/compare/e2b)

**Best for:** agents already on E2B that pause between turns and need memory, processes and files back

Pausing an E2B sandbox saves its filesystem and memory, and paused sandboxes are kept with no time limit. By default a sandbox times out after 5 minutes and is killed with its files; set `onTimeout` to pause instead and the files come back on resume.

#### Strengths

-   Exact resume, memory included
-   No retention limit on paused sandboxes
-   No new vendor

#### Tradeoffs

-   Deleting or killing the sandbox loses everything; files can't be read without resuming it
-   One sandbox's files; sharing needs Volumes, in private beta
-   Sandbox disk is 10 GiB on Hobby and 20 GiB or more on Pro

### 3. Daytona

[daytona.io](https://www.daytona.io/docs/en/sandboxes) · [Archil vs Daytona](https://archil.com/compare/daytona)

**Best for:** development environments that stop when idle and come back with their files

Stopping a Daytona sandbox keeps its filesystem, and stopped sandboxes are kept until deleted; container sandboxes archive after 7 days stopped. Volumes are free, S3-backed FUSE mounts that outlive any sandbox and can be shared.

#### Strengths

-   Files kept on stop by default
-   Free volumes, shared across sandboxes

#### Tradeoffs

-   Sandbox disk is 3 GiB by default and 10 GB at most
-   Volumes are last-write-wins and not for databases
-   Volumes mount only in Daytona

### 4. Vercel Sandbox

[vercel.com](https://vercel.com/docs/sandbox/concepts/persistent-sandboxes) · [Archil vs Vercel Sandbox](https://archil.com/compare/vercel-sandbox)

**Best for:** agents in Vercel apps that need files and packages back after a stop

Persistence is on by default: a Vercel sandbox saves its filesystem and installed packages when it stops and restores them on resume. Drives add storage that outlives the sandbox, mounted read-write by one sandbox at a time, with read-only mounts for others.

#### Strengths

-   On by default, with no snapshot management
-   64 GB of NVMe per sandbox

#### Tradeoffs

-   Snapshots expire 30 days after last use by default, and sandboxes that can't resume are removed after 14 days of inactivity
-   A Drive takes one writer at a time
-   Drive writes weren't durable when `fsync` returned, in Archil's test

### 5. Modal Volumes

[modal.com](https://modal.com/docs/guide/volumes) · [Archil vs Modal](https://archil.com/compare/modal)

**Best for:** agents that already run on Modal, especially with GPUs

A Modal sandbox's own files are lost when it ends unless you snapshot it. Write working files to a Volume instead: Volumes persist independently and mount in many sandboxes, with changes committed in the background.

#### Strengths

-   Built into Modal, alongside GPUs
-   Shared across sandboxes

#### Tradeoffs

-   Readers must reload to see other sandboxes' changes, and last write wins
-   Mounts only in Modal

### 6. Claude Managed Agents memory stores

[platform.claude.com](https://platform.claude.com/docs/en/managed-agents/memory)

**Best for:** small text notes an agent on Claude Managed Agents should remember between sessions

A memory store is a workspace-scoped collection of text documents, mounted in a Claude Managed Agents session's sandbox under `/mnt/memory/`, which the agent reads and writes with its ordinary file tools. Stores persist across sessions and can be shared by many sessions, read-write or read-only. Each memory is capped at 100 KB (about 25,000 tokens) and a store holds up to 10,000. The session's own sandbox files are a separate matter: Anthropic keeps sandbox state for 30 days after the sandbox is created, and deleting a session deletes the files it produced.

#### Strengths

-   Built into Claude Managed Agents, with no storage to run
-   Shared across sessions, with 30 days of version history

#### Tradeoffs

-   Text documents of up to 100 KB each: no repositories, `node_modules`, binaries or SQLite files
-   Attached only when a session is created, at most 8 stores per session
-   In beta, and only for agents on Claude Managed Agents

### 7. Sync to a bucket or git yourself

[docs.aws.amazon.com](https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html)

**Best for:** small workspaces where losing the last few minutes of work is acceptable

Copy the workspace to S3 with `aws s3 sync`, or commit and push to git, at the end of each step and restore it when the next sandbox starts. It needs no new service.

#### Strengths

-   No new vendor
-   Files end up somewhere you already control

#### Tradeoffs

-   Anything written since the last sync is lost on a crash or timeout
-   Restoring a large workspace means downloading it every time
-   Git doesn't suit `node_modules`, build output or large data

## Which one should you use?

| If you need | Pick |
| --- | --- |
| Files and packages that survive every kind of restart, on any provider | Archil |
| Stay on E2B and resume exactly where the agent left off | E2B with pause on timeout |
| A dev environment that stops when idle | Daytona or Vercel Sandbox |
| Already on Modal, or need GPUs | Modal Volumes |
| Short text notes the agent should remember | Claude Managed Agents memory stores |
| A small workspace and no new services | Sync to a bucket or git |

## Questions people ask

### Why do my agent's files disappear when the sandbox restarts?

They're written to the sandbox's own disk, which is discarded when the sandbox is killed, times out or is deleted. Keep them on a volume or disk that outlives the sandbox, or use a platform that keeps the disk on stop.

### Do installed packages survive a restart?

Only if the platform keeps the root filesystem: Archil, Daytona and Vercel Sandbox do on stop, and E2B on pause. A volume mounted at a path keeps only what's under that path.

### Can a memory store replace a file system for agents?

No. Memory stores hold short text notes; Claude Managed Agents memory stores hold text documents of up to 100 KB each. An agent's repository, dependencies and databases need a file system.

### Can several sandboxes share the persisted files?

Yes with an Archil disk (up to 5,000 clients), Modal Volumes or Daytona Volumes. E2B's paused sandboxes and Vercel's snapshots belong to one sandbox, and a Vercel Drive takes one writer.

### What survives a crash?

On an Archil disk, every write that `fsync` returned for. A paused or stopped sandbox survives only if it was paused or stopped cleanly; files written since the last sync to a bucket are lost.

## How we chose

We compared the ways teams keep an agent's working files across sandbox restarts: what each keeps after a stop, timeout, crash or deletion, size and type limits, sharing and pricing. Competitor facts come from each vendor's own docs as of the date above. Archil makes Archil, and ranks it first because a disk outside the sandbox survives every kind of restart on any provider; if you're staying on one provider and only need clean stops and pauses, its own persistence is simpler.

## Related

-   [Best persistent sandbox platforms for AI agentsWhat pause, stop and snapshots keep on each platform.](https://archil.com/compare/sandbox-providers)
-   [Best E2B alternatives with persistent storageWhere to go when files vanish at the timeout.](https://archil.com/compare/best-e2b-alternatives-with-persistent-storage)
-   [How to keep an AI agent's environment across sandbox restartsPackages, files and state that survive a restart.](https://archil.com/article/how-to-keep-an-ai-agent-s-environment-across-sandbox-restarts)
-   [Best storage for AI agentsShared and persistent file systems, and why agent memory is a separate problem.](https://archil.com/compare/best-storage-for-ai-agents)

Or see [every comparison](https://archil.com/compare).
