Skip to content

Session lifecycle ​

A session is one desktop container with one disk. It is in one of six states. The app shows the state; the API returns it as state.

StateMeaningComputeWhat an MCP call does
startingThe desktop is starting or wakingStartingWaits until it runs, then answers
runningThe desktop is upIn useAnswers
stoppingThe desktop is shutting down, after a sleep, a stop or a deleteReleasingDepends on what it becomes
asleepYou chose Sleep, or it was idle for 15 minutes. Disk and snapshot keptNoneWakes it, waits, then answers
stoppedYou chose Stop. Disk kept, no snapshotNoneFails with 409
failedThe desktop could not start. message says whyNoneFails with 502

Transitions ​

FromCauseTo
(none)Createstarting, then running. A small session is ready in seconds; a bigger one starts cold
runningSleep, or 15 minutes without usestopping, then asleep
asleepAn MCP call, Wake, or a file sent or savedstarting, then running
running or startingStopstopping, then stopped
asleepStopstopped; the snapshot is discarded
stoppedStartstarting, then running
anyDeletegone

Sleep and stop compared ​

SleepStop
Who causes itYou, with Sleep, or the service when idleYou, with Stop
Snapshot of the running desktopTaken; this takes a few secondsNot taken
Wakes on an agent's callYesNo
Comes back withThe screen and processes as they wereA fresh start from the disk: an empty desktop; tabs reload when the browser is next opened
The app saysasleepstopped: starts fresh

A sleep you ask for and an idle sleep are the same thing: both wake on the next MCP call. To keep a session off until you start it, stop it.

If the snapshot cannot be taken, the session still goes to sleep, and wakes like a stopped one: from its disk. The app then says asleep: state not saved, and the API leaves stateSaved out. A snapshot that cannot be restored is given up the same way.

Changing the size ​

A session's size can be changed at any time. One that is asleep or stopped has the new size at once. One that is awake keeps running, and has it from its next start. That start is always a fresh one, from the disk, as after a stop: a snapshot belongs to the size it was taken at, so resizing a sleeping session drops its saved state, and a session with a resize waiting goes to sleep without one.

If there is no machine with room for the session's size, Wake, Start and an agent's call answer 409 and the session stays as it is.

What counts as use ​

Keeps a session awake:

  • its screen open in a visible browser tab,
  • an MCP call, for as long as it runs,
  • sending, saving or deleting a file.

Does not:

  • a session page in a background tab, after one minute,
  • an MCP client that is connected but not calling,
  • listing sessions or files.

What is kept ​

Across callsAcross sleepAcross stopAfter delete
Disk: browser profile and logins, downloads, /data/memory/, artifactsYesYesYesNo
Open windows, page state, running processesYesYes, from the snapshotNoNo
Variables in run_jsNoNoNoNo
Name and MCP URLYesYesYesNo