Skip to content

Commit fb23b8e

Browse files
committed
docs(gateway): keep warm images opt-in pending a proven capture boundary
Review finding: default-on capture would persist setup-created state outside the scrubbed worker root into provider images for profiles that never opted in. suspendAfter pairs with warmImage: true for warm wakes.
1 parent 1442ef4 commit fb23b8e

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

‎docs/gateway/cloud-workers.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Add a profile under `cloudWorkers.profiles` in `openclaw.json`:
9999
"class": "standard",
100100
"ttl": "8h",
101101
"idleTimeout": "45m",
102+
"warmImage": true,
102103
"setup": "test -x /usr/bin/node || (curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs)"
103104
}
104105
}
@@ -109,13 +110,13 @@ Add a profile under `cloudWorkers.profiles` in `openclaw.json`:
109110

110111
Profile fields:
111112

112-
| Key | Meaning |
113-
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
114-
| `provider` | Worker provider id registered by a plugin (`crabbox` for the bundled plugin). |
115-
| `install` | Installation preference for SSH-backed providers. The bundled Crabbox provider always installs the current Gateway bundle through the authenticated node channel. |
116-
| `suspendAfter` | Optional idle duration, such as `45m`, `90m`, or `2h`; minimum `1m`. Automatically suspend an idle worker using the same safe stop as manual reclaim. The next message provisions a replacement, warm when a snapshot exists. While suspended, only retained snapshot storage is billed; omit this field to keep workers running until explicitly stopped. |
117-
| `settings` | Provider-owned JSON. For crabbox: `provider` (backend), `class` (machine class), `ttl`, `idleTimeout` (Go durations), optional idempotent `setup`, optional `desktop`, and absolute `binary` path. While a session remains placed, OpenClaw heartbeats its lease at a safe fraction of `idleTimeout`; teardown stops the heartbeat before releasing the machine. `desktop: true` asks Crabbox to warm the lease with its browser and loopback RFB desktop before node enrollment. |
118-
| `settings.warmImage` | Optional, enabled by default; set to `false` to disable reusable machine images. When an enrolled worker stops, OpenClaw saves an image for later workers with the same profile. Images incur snapshot storage charges in your cloud provider account. OpenClaw removes worker identities, device tokens, bundles, and all workspace files before capture; use image reuse only for mutually trusted workloads. Capture adds at most about three minutes to a stop on providers with slow native snapshots, then degrades to cold-only provisioning. Capture needs a Crabbox release with fixed-ID checkpoint forks, and coordinator-brokered leases additionally need `broker.adminToken`; without either, every stop degrades to normal cold provisioning with one warning. |
113+
| Key | Meaning |
114+
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
115+
| `provider` | Worker provider id registered by a plugin (`crabbox` for the bundled plugin). |
116+
| `install` | Installation preference for SSH-backed providers. The bundled Crabbox provider always installs the current Gateway bundle through the authenticated node channel. |
117+
| `suspendAfter` | Optional idle duration, such as `45m`, `90m`, or `2h`; minimum `1m`. Automatically suspend an idle worker using the same safe stop as manual reclaim. The next message provisions a replacement, warm when a snapshot exists. While suspended, only retained snapshot storage is billed; omit this field to keep workers running until explicitly stopped. |
118+
| `settings` | Provider-owned JSON. For crabbox: `provider` (backend), `class` (machine class), `ttl`, `idleTimeout` (Go durations), optional idempotent `setup`, optional `desktop`, and absolute `binary` path. While a session remains placed, OpenClaw heartbeats its lease at a safe fraction of `idleTimeout`; teardown stops the heartbeat before releasing the machine. `desktop: true` asks Crabbox to warm the lease with its browser and loopback RFB desktop before node enrollment. |
119+
| `settings.warmImage` | Optional, disabled by default. Set to `true` to save a reusable machine image when an enrolled worker stops and start later workers with the same profile from that image — pair it with `suspendAfter` so suspended sessions wake warm. Images incur snapshot storage charges in your cloud provider account. OpenClaw removes worker identities, device tokens, bundles, and all workspace files before capture, but the image also retains whatever `settings.setup` wrote elsewhere on the machine, so keep setup credential-free and enable reuse only for mutually trusted workloads. Capture adds at most about three minutes to a stop on providers with slow native snapshots, then degrades to cold-only provisioning. Capture needs a Crabbox release with fixed-ID checkpoint forks, and coordinator-brokered leases additionally need `broker.adminToken`; without either, every stop degrades to normal cold provisioning with one warning. |
119120

120121
### Per-project default profiles
121122

‎docs/gateway/configuration-reference.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ The bundled `crabbox` provider provisions a disposable machine through the local
10041004
- `settings.provider` (required): Crabbox backend passed through `--provider`; `aws` selects the direct AWS backend.
10051005
- `settings.class` (required): Crabbox machine class passed to `--class`.
10061006
- `settings.ttl` and `settings.idleTimeout` (required): positive Go duration strings passed to `--ttl` and `--idle-timeout` as provider-side failsafes.
1007-
- `settings.warmImage`: reusable machine images are enabled by default; set this to `false` to disable capture and image reuse. Images incur provider snapshot storage charges. Capture adds at most about three minutes to a stop on providers with slow native snapshots, then degrades to cold-only provisioning.
1007+
- `settings.warmImage`: set to `true` to capture a reusable machine image at each stop and start later workers with the same profile from it; pair with `suspendAfter` so suspended sessions wake warm. Disabled by default because images incur provider snapshot storage charges and retain whatever `setup` wrote outside the scrubbed worker state. Capture adds at most about three minutes to a stop on providers with slow native snapshots, then degrades to cold-only provisioning.
10081008
- `settings.binary`: optional absolute Crabbox executable path. Without it, OpenClaw checks the sibling Crabbox checkout, then executable entries on `PATH`, and finally invokes `crabbox` so a missing CLI remains a visible provider error.
10091009

10101010
Unknown settings are rejected. Crabbox credentials and backend-specific account configuration remain owned by Crabbox; do not place them in `settings`. OpenClaw invokes only the local CLI and makes no provider network calls from this plugin. Provisioning passes one deterministic canonical lease ID through `--lease-id`, keeps `--slug` as display metadata only, and always passes `--keep=true`; OpenClaw owns the external lifecycle and destroys the lease with `crabbox stop --id <canonical-id>`. After an ambiguous result, Gateway reconciliation repeats the same fixed-ID operation. Crabbox must return the exactly attested lease or fail closed; OpenClaw never falls back to slug adoption or replacement allocation.

‎docs/plan/worker-hibernation.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ sibling `openclaw/crabbox` checkout (`../crabbox` @ 19bd2f51).
1515

1616
Product update (2026-08-26): profile-level `suspendAfter` is the accepted knob
1717
for automatically suspending idle workers; the next message provisions a
18-
replacement. Crabbox warm images now default on, with
19-
`settings.warmImage: false` as the opt-out. This supersedes the phase-1
20-
opt-in/default-off assumptions below; phases 2 and 3 remain gated.
18+
replacement. Crabbox warm images remain opt-in (`settings.warmImage: true`,
19+
paired with `suspendAfter` for warm wakes): review found that default-on
20+
capture would retain whatever `setup` wrote outside the scrubbed worker root
21+
(setup-created credentials included) in provider images for profiles that
22+
never chose it. Default-on returns only with a proven capture boundary.
23+
Phases 2 and 3 remain gated.
2124

2225
Live proof (2026-08-26, isolated dev gateway, Crabbox dev build with the
2326
fixed-ID fork contract):

0 commit comments

Comments
 (0)