Skip to main content
Sometimes your workload needs to keep state between calls — an agent builds a file mid-task, or a workflow spans multiple sandbox invocations that each need access to the same data. That’s when sessions and filesystems come in. Sessions group related runtime resources so they can be managed together. Filesystems provide persistent storage you can attach to a session, letting stateful workloads keep data across calls.

Key ideas

How it works

Workloads in a session read and write the attached filesystem. Data persists across sandbox allocations and instance restarts within the same session.

States

A filesystem must be ready before it can be attached.

Create a session

string
Unique session identifier.
string
ISO 8601 creation timestamp.

Attach a filesystem

string
required
The filesystem to attach to this session.

Detach a filesystem

See the API Reference for the full session and filesystem operations.
Sandbox-local storage is destroyed. Data written to an attached filesystem persists independently of the sandbox lifecycle.
Yes, but scope filesystems to related workloads for isolation. Concurrent writes from unrelated processes can cause conflicts.
See the Tiers & Limits page for storage quotas per plan.

Limits & quotas

Errors

Security

Scope each filesystem to the specific workloads that need it. Attaching a filesystem to a broad session gives all workloads in that session read/write access.

Common mistakes

  • Assuming sandbox storage is permanent. A released sandbox’s local storage is gone; use a filesystem for data that must survive.
  • Sharing one filesystem across unrelated workloads. Scope filesystems to the work that needs them.

Best practices

  • Attach a filesystem only for the lifetime you need it, then detach.
  • Keep filesystems scoped to a single workload or session for isolation.
  • Delete unused sessions and filesystems to free storage.

Sandboxes

On-demand execution environments.

Runtime Lifecycle

Leases and resource lifecycle.

Instances

Long-running deployments.

Compute Overview

The Compute model end to end.

Next steps

Continue to Runtime Lifecycle.