Cloud Sessions V2
How the default-on Cloud Sessions V2 path selects machines and controls remote workers.
Cloud Sessions V2 is on by default, with a Lab toggle (cloudPortableExecutionEnabled) for rollback. Existing installs are enabled once on their next normal app load; later opt-outs remain off. Fresh installs also preserve an opt-out made during their first session. It selects the provider-independent execution path for new detached cloud sessions. Each session records its protocol when created, so changing the toggle leaves existing sessions on their original path.
New V2 sessions also record machine core version 2. The previous portable implementation stays available to its existing sessions. Turning the toggle off restores the older path for new launches; changing providers affects new sessions while existing ones retain their machine and workspace.
The controller admits the session before a machine is rented. Machine selection goes through the existing connector registry: adapters supply machine sizes, SSH access, working directories and provider-specific lifecycle operations. The shared preparation code ships the project through the existing Git road, installs its tools and dependencies, and starts the supervised worker. A compatible shared machine can be reused through existing placement and resource reservations.
Core V2 uses one preparation pipeline across vendors. Purchases have a durable operation identity and original request, so recovery verifies the existing provider operation rather than renting a duplicate. Workspace bindings include tenant, provider account, payer and project. Reconnecting to an existing workspace preserves its tree. V2 hosts share only within their account-scoped pool. An interrupted provisioning claim may hold recovery for up to 30 minutes to prevent overlapping setup.
The worker renews its execution authority directly with the controller. It stops accepting work and terminates its agent when that authority is refused or expires. A turn completes only after its own checkpoint has been published, read back and acknowledged for the same execution attempt and worker run.
Box, Google and Agent 37 have adapters. This does not imply identical pause, snapshot or machine-sharing capabilities. The existing capacity reservations remain in place; this implementation supplies no measured new sessions-per-VM figure. It also does not automatically move a live conversation between hosts or retry uncertain external actions.
The API migration and updated guest supervisor must be deployed together before enabling this experimental path. Existing developer enrollment and repository restrictions apply. Implementation was reviewed without running tests or launching Omniscio, as requested by the owner.
This extraction does not move provider credentials or provider lifetime renewal into a new cloud service. It does not enable moving a running conversation between providers. Snapshot, lifetime-extension and pricing support are optional connector capabilities; absence is not treated as a free or successful operation.
Boat and Agent 37 use shared purchase validation, including the image-clone path. Session cancellation is propagated into command waiting and checked before purchases; an already-issued create still has to record its machine identity. Uncertain provider responses remain unresolved rather than triggering another purchase. Access preparation, command results and returned machine coordinates are checked at the shared boundary, and cleanup failures retain the original error. Google activation is deferred.
The V2 coordinator now receives one fixed launch context and uses provider capabilities resolved at entry. Shared session types are owned by the generic core; old Box imports remain compatible. Preparation shell commands have durable identities and private guest completion receipts, including commands used to join a shared host. A lost response cannot silently repeat setup or buy another machine while the earlier command is unresolved. On reconnect, matching receipt evidence can establish the foreground command's exit status. Missing evidence keeps recovery blocked; it does not mean the command never started. Background subprocesses and SCP/Git byte transfers retain their separate lifecycle rules.
Implementation map: cloud-portable-execution-map.md.