> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bead.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox lifecycle states

> Track sandbox lifecycle states while creating, connecting, pausing, resuming, and deleting machines.

Follow sandbox lifecycle states as you create a machine, wait for readiness, run work, then pause or delete it. Inspect durable state when a request is pending or its response is uncertain.

## Create and inspect

```bash theme={null}
bead create --template base --size small --kind temporary --timeout 300
bead inspect ID
bead list --limit 20
```

Use the returned machine ID in place of `ID`. Creation reserves admission and funding before dispatch. A successful ready response means the guest acknowledged readiness; an application's own HTTP server can still be initializing.

Lists include running and paused machines. For another page, pass the returned cursor to `bead list --cursor CURSOR`.

## Connect and run

Use [exec](https://docs.bead.run/connect/exec.md), [file transfer](https://docs.bead.run/connect/files.md), or [application forwarding](https://docs.bead.run/connect/ports.md). Funded persistent machines can resume on access. For explicit control:

```bash theme={null}
bead pause ID
bead resume ID
bead inspect ID
```

A lifecycle request and its final state are separate. Wait for the expected running or paused state before relying on it. See [machine lifetime](https://docs.bead.run/run-work/lifetime.md).

## Recover uncertain operations

Retain an idempotency UUID before a lifecycle mutation. Use `--idempotency-key UUID` to preserve the request's identity when retrying the same request.

If a capture failed, inspect `preservation`: its message, operation ID, recovery state, and next action describe whether to wait or resume/delete the source. Repeated mutation attempts do not replace this inspection.

## Delete

```bash theme={null}
bead delete ID
```

If deletion returns an operation ID, inspect it through `GET /operations/{id}` until cleanup is acknowledged. Save required files or a snapshot before deleting. Deleting a volume-mounted machine releases the attachment after lifecycle cleanup; the volume has its own retention.

Read [snapshots](https://docs.bead.run/snapshots/overview.md), [volumes](https://docs.bead.run/platform/volumes.md), and [limits](https://docs.bead.run/platform/limits.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.