State & time travel

Sleep and wake

Put a VM to sleep at zero memory and zero CPU, and wake it in 8.4 ms.

What it is

Zero memory, zero CPU while it sleeps; back in 8.4 ms when it wakes.

Sleep writes the whole VM to a file and ends its process. Wake brings it back under the same name, mid-program, with its network rules intact.

Why it matters

Agents spend most of their life waiting for the next turn. Sleep turns that waiting into a file on disk, so the host spends its memory on the VMs doing work.

  • Free while idle. Just a file on disk: zero process, zero memory, zero CPU.
  • Same VM back. Same name, same programs, same rules.
  • Instant return. Awake in 8.4 ms, carrying on mid-program.

Runs on

  • Linux x86_64
  • Linux arm64
  • macOS
  • Windows x64
  • Windows arm64

How it works

One command each way.

CLI

flash sleep vm-1
flash ls
flash wake vm-1

MCP

flash_sleep(vm_id: "vm-1")
flash_wake(vm_id: "vm-1")

API

PATCH /v1/host/flashvms/{vm_id} {"state": "sleeping"}
PATCH /v1/host/flashvms/{vm_id} {"state": "running"}

The result

Asleep with no process at all; awake in 8.4 ms, counting on from where it slept.

After waking it reaches the internet again, under the same rules as before.

How it works

Related

See it live: flash demo run 18