Skip to main content
Start with the Runloop Quickstart to use the examples below.

Devbox States

Devboxes represent a persistent dev environment that can be launched and shut down as needed. Over the course of a Devbox’s lifecycle, it will transition through a series of states depending on your use case:
  • Provisioning: Runloop is allocating and booting the necessary infrastructure resources.
  • Initializing: Runloop defined boot scripts are running to enable the environment for interaction.
  • Running: The Devbox is ready for interaction.
  • Failure: The Devbox failed as part of booting or running user requested actions.
  • Shutdown: The Devbox was successfully shutdown and no more active compute is being used.
  • Suspending: The Devbox disk is being snapshotted and as part of suspension.
  • Suspended: The Devbox disk is saved and no more active compute is being used for the Devbox.
  • Resuming: The Devbox disk is being loaded as part of booting a suspended Devbox.

Suspending and Resuming Devboxes to Save Disk State

In addition to use idle management configuration, you can also manually suspend and resume a devbox.
Only disk state, not in-memory state is preserved during suspend/resume operations
1

Suspend the devbox

devbox = runloop.devbox.from_id(devbox_id)
await devbox.suspend()
2

Wait for the devbox to be suspended

await devbox.await_suspended()
3

Resume when needed

devbox = runloop.devbox.from_id(devbox_id)
await devbox.resume()
4

Wait for the devbox to be running

await devbox.await_running()

Important Notes

  • Suspended Devboxes still incur storage charges until explicitly shut down
  • The suspend/resume process typically takes seconds, depending on the amount of modified data
  • Daemons or other processes running at suspend time must be manually restarted after resuming
  • The original Devbox ID and SSH keys are preserved through suspend/resume cycles