Repository navigation
v1.19.0 — Redeploy data integrity
Redeploying an agent could delete the durable state it was supposed to preserve. Upgrade before your next redeploy.
The exposure differs by target:
| Runtime / target | Before v1.19.0 |
|---|---|
| Hermes on Docker | State deleted when a redeploy failed after the container was created — most likely under concurrency |
| OpenClaw on Docker | /root/.openclaw deleted on every redeploy, successful ones included |
| Kubernetes | State PersistentVolumeClaim deleted on every redeploy |
An agent that lost its state usually came back looking healthy, because the deployment retried and rebuilt the runtime against a fresh empty volume. If you have redeployed agents on an earlier version, check them against your expected configuration rather than their status.
Fixes
- A failed redeploy no longer deletes the agent's data. Durable state is keyed by agent id, not container id, so the cleanup that removed a failed replacement runtime was also removing the state of the agent it was replacing. Deployment cleanup now preserves state for any agent that still exists; removing it belongs solely to agent deletion, which already runs under the same per-agent provision lock. This also protects an agent whose runtime a newer deployment has already taken over — the case an operator hits by redeploying twice in quick succession.
- OpenClaw on Docker keeps
/root/.openclaw, and Kubernetes keeps its state claim.preserveStatewas implemented only in the Hermes adapter, so the redeploy path's request to preserve was a silent no-op for both. - A failed container create no longer removes volumes it did not create.
create()now cleans up only the volumes it brought into existence, so a transient failure during a replacement cannot erase state that predates it. - A slow Hermes restart no longer destroys a healthy runtime. Reapplying saved model configuration and channels restarts Hermes and waits for its runtime API; a container slow to come back — several concurrent redeploys contending for one host — used to fail the entire deployment and tear down a runtime that was fine. The reseed is now warn-only, matching the OpenClaw channel reseed beside it, and the agent is left in
warningwith anagent_deployed_degradedevent naming what did not apply. A genuinely unreachable runtime still fails through the readiness barrier as before.
Changed
- Backend adapters preserve durable state by default.
preserveStatepreviously had to be passed to keep data, so any caller that omitted it deleted an agent's volumes — which is how this class of bug arose. Omitting it now leaks a volume, which is recoverable, instead of destroying configuration, which is not; only an explicitpreserveState: falseremoves state.containerManager.destroystill defaults to removing state, so deleting an agent is unchanged. The requirement is now documented onProvisionerBackend.destroyand in the backend adapter README.
Operator notes
- Concurrent redeploys are safe for your data now, but three at once still contend on restart (
DEPLOYMENT_WORKER_CONCURRENCYdefaults to 3). They will land inwarningwith anagent_deployed_degradedevent rather than failing. Set it to1if you prefer redeploys to serialize. - Nothing to migrate. No schema, configuration, or API changes.
Verification
Prep commit 75bd775, all five required workflows green:
- CI Quality — run 33468803490
- CI Compose Pipeline — run 33468803411
- CI Security — run 33468803443
- Supply chain — run 33468803448
- CodeQL — run 33468805684
Code merged in #415 and #416: backend-api 189 suites / 2407 tests, workers/provisioner 58 tests, typecheck clean in both.
Full Changelog: v1.18.0...v1.19.0