Skip to content

Your VM sleeps when nothing uses it. While it sleeps you pay only for storage: its disk, plus its saved memory if it sleeps in memory. The next request wakes it at the same address, and a VM asleep in memory resumes its programs where they stopped.

The default policy is auto. It checks for activity after 60 seconds without an external request. Requests, typed input, active previews and active jobs keep the VM awake. So does work inside the VM: CPU, disk or network use, a running build or test, and an agent turn that waits for its model. A keystroke in a terminal keeps the VM awake for 5 minutes. An open terminal alone does not.

Output is not work. A spinner or a log does not keep the VM awake. Neither does a connection that carries only keep-alives, below 1 KB a minute.

auto knows what common programs look like while they work:

Program Counts as work while
Coding agents (Claude Code, Codex, opencode) a turn runs and its model request waits for the answer
Servers, any program with a listening port a client’s connection moves data
Builds, package managers and playwright test they run
Browsers the program driving them works; an idle tab does not count
Remote desktop (VNC, noVNC) a viewer’s connection moves data
Terminal multiplexers (tmux, zellij, screen) never by themselves; each pane counts by what runs in it
Tunnel daemons (cloudflared, ngrok, Tailscale) never by themselves; forwarded traffic counts for the server it reaches

Scroll horizontally to see all columns.

The state depends on what is still running. A sleep in memory keeps the processes that remain, such as a shell, an agent turn or a server with a port. A sleep on disk applies when no user process remains and no service declares a port.

Sleep in memory Sleep on disk
Kept Files and process memory Files and installed packages
The next request Restores the processes where they stopped Starts a fresh VM from the saved disk

Scroll horizontally to see all columns.

A service does not keep the VM awake by itself. A service that declares a port is saved in memory and resumes after the wake.

Either way, CPU and memory stop counting the moment the VM sleeps. While it’s awake they count per second at the VM’s full size, not by load, so an agent waiting on its model costs the same as one compiling. Storage counts all the time: the disk’s allocated bytes, plus the saved memory of a VM that sleeps in memory. Billing has the details.

si svm stop ends the processes and keeps the disk. si svm pause keeps process memory when a process needs it, and otherwise sleeps on disk.

Open connections always end when the VM sleeps or stops. Browser apps, WebSockets, database clients and agent tools must reconnect, and their next request wakes the VM.

A resumed process can hold stale connections, locks, tokens or timeouts. Write work to files, and make external effects safe to retry.

A background job keeps its log on disk, but its process ends at a sleep on disk. A service starts again after a sleep on disk unless you stopped it. See services.

Activity Wakes the VM
An API request, si exec, si cp or si job start Yes
A terminal, preview, SSH or port-forward connection Yes
An accepted inbox message, from email or Telegram Yes
A due schedule Yes
si svm start Yes
A timer or cron job inside the VM No

Scroll horizontally to see all columns.

A sleeping VM runs nothing, so a timer or cron job inside it cannot wake it. Work that must run at a set time needs a schedule. A request that the API gateway refuses does not reach the VM and does not wake it.

  • auto is the default. Use it for agents, builds and interactive work. It wakes for a request and sleeps when nothing uses the VM.
  • timer sleeps the VM after a set time without external activity, even while a process is busy. Use it when a process should not keep the VM awake, or for a fixed maximum life of a preview or coding session.
  • on never sleeps the VM. Use it when the VM must stay reachable, such as for SSH from your tailnet. It uses its memory all the time.

A timer is not a scheduler. A schedule starts work at a set time. A timer only decides when an idle VM sleeps.

A timer needs the mode and the duration together. auto and on take no duration. si svm sleep needs the VM name every time. It does not use your default VM.

Terminal window
VM=my-vm
si svm sleep "$VM" timer 30m
Output
timer 30m

A running VM applies auto or a timer at its next check, and applies on at once. A sleeping VM applies auto or a timer after its next wake. on starts it at once.

auto sleeps the VM when none of its work remains. A keep-awake lease counts as work. Hold one for a long command that uses little CPU, for a job that does a little every few seconds, or for a fixed time.

Terminal window
keep-awake -- npm run build
keep-awake --for 2h
keep-awake on --reason "rendering"
keep-awake off
keep-awake status

keep-awake -- <command> holds the VM while the command runs and exits with its status. The lock ends with the command, also when the command fails. Tools that call systemd-inhibit work unchanged: a --what that names sleep or idle holds the VM for the command.

A lock does not override timer. The VM still sleeps at its time.

Setting Limit
Idle check in auto 60 seconds without an external request
Awake after a wake At least 60 seconds
Request that waits for an external service At most 15 minutes
keep-awake lease 4 hours unless refreshed
timer duration 30 seconds to 24 hours

Scroll horizontally to see all columns.

The full list is in Limits.

  • Schedules: run commands at a set time, while the VM sleeps.
  • Email: a message wakes the VM and lands on disk.
  • Isolation: what a VM can reach while it’s awake.