On this page

On this page

Maintenance

Updating

Keep OpenClaw up to date.

For Git checkouts and npm, pnpm, or Bun global installs, run:

bash
openclaw updateopenclaw update status

The next version is prepared beside the serving installation, not over it. Git installs build a detached worktree; package installs download and extract the package outside node_modules, then install its production dependencies. For a Git release, local-change checks apply to the selected release worktree. Changes in its shared repository's original checkout stay untouched. An updater running from another worktree keeps the selected release as the current version and rollback target. When OpenClaw runs under Bun, preparation uses Bun's production installer and keeps Bun for release checks and plugin maintenance. Bun is admitted through its WAL-reset-safe node:sqlite requirement, not the package's Node engine range. The new release checks its own configuration and plugin surfaces with update check-release and maintains plugins with update plugins. Targets that predate the release-update commands and launcher readiness contract are refused without changing the serving release. The error gives an exact manual install command. Targets supporting older database schemas are refused by the existing schema compatibility check before release preparation.

A resident launcher selects the pending release when the Gateway next starts. Under the existing exclusive database custody, boot runs each store's canonical schema steps in place, then confirms readiness. It does not migrate a private state tree, run a Doctor chain, rebuild databases generically, or swap database files to publish the upgrade.

Outside an update trial, startup's ACP metadata scan skips agents whose stores are already refused. The affected agent remains unavailable, with its name and repair command in the agent list and openclaw status --all; healthy agents keep serving. Trial startup retains its existing refusal and rollback behavior.

A compatible schema step that preserves the derived minimum reader version needs no recovery image. Before a step raises that floor, boot records an independent preimage for the affected database. If the trial fails, the launcher restores the previous release and only the recorded raised-floor images; compatible databases stay in place. Writes made only to a raised-floor database during the failed trial are discarded when its image is restored. See PostgreSQL update recovery for server-backed storage requirements.

--no-restart prepares the release but leaves the running Gateway alone; its next start still receives the same automatic trial and rollback protection. Running openclaw --container <name> gateway run targets the container, not the host Gateway, so it leaves the host release pending even if the lookup fails. The first conversion keeps existing PATH shims working through forwarding entries and stages an owned user service's launcher definition with a backup. System-owned service definitions keep their forwarding entries.

Installing a newer package with npm i -g openclaw@<version> after conversion replaces the npm package, not a running Gateway. Run openclaw update, or use your next managed openclaw gateway start or openclaw gateway restart, to apply that installed package through the same release checks and trial. The old Gateway keeps serving during preparation. The npm entry then follows the resident launcher's selected release, including automatic rollback. If the Gateway is already running, gateway start leaves it running and reports the old serving version and the prepared new version. Run openclaw gateway restart to apply the prepared release.

openclaw update status shows the invoking CLI, selected release, pending trial, and observed Gateway separately. An unavailable or remote Gateway is not treated as a verified local release. Saved update results are historical, not a current health check.

An older npm package does not silently downgrade a newer managed Gateway. Managed start/restart keeps the selected release. Use openclaw update --tag <version> for an explicit downgrade. An explicit --tag or --channel remains your target selection instead of the npm package.

Plugin maintenance failures are warnings, not failed core updates. The final summary names the failed step and its recovery command. An already-current installation still maintains plugins and restarts only when needed and requested.

Older installed updaters still perform their first hop with their shipped update flow. The compatibility and recovery details below also cover those older updaters; they do not describe in-place replacement by the release updater.

Failed-update recovery on Linux restarts an installed Gateway through systemd. If a foreground OpenClaw process owns that service's state directory, recovery checks native restart permission and live identity, requests graceful shutdown, and waits for it to exit before starting the unit. Processes belonging to another supervisor are preserved. An inconclusive readiness check is reported separately from current serving health. This recovery repair is supplied by the candidate CLI; older updaters using gateway restart --preserve-definition can use it without an updater upgrade.

For a Linux system service, run maintenance as the account in its User= setting with the service's existing HOME, OPENCLAW_HOME, OPENCLAW_STATE_DIR, OPENCLAW_CONFIG_PATH, and profile selectors. When that account differs from the one running openclaw update, the update is refused before anything changes; see Linux system service run by another account.

App-owned packages declare their update owner in openclaw-install-owner.json at the package root. For owner: "macos-app", update OpenClaw.app through its app updater to update the bundled Gateway and runtime together. The official container image declares owner: "container-image": pull the new image and recreate the container. openclaw update, openclaw update repair, and Gateway update requests return the marker's update hint without changing the package or stopping the Gateway; background checks skip package-registry updates. Missing or invalid markers retain normal install behavior, with a warning for an invalid marker. An npm, pnpm, Bun or Git install that you set up yourself inside a container, devcontainer or LXC host has no marker and updates normally.

After a Mac app update, recovery checks the service selected by the connection mode: the local Gateway or, with a remote primary, the Mac node service. If a custom node launcher cannot be inspected, check its node LaunchAgent before retrying. This node inspection failure does not invalidate an already verified local Gateway. Recovery keeps the update receipt for retry, verifies the node after its launcher is repaired, and leaves the custom launcher unchanged.

For standalone builds, update the owning desktop app or replace the complete executable and runtime directory. The standalone CLI refuses package-manager and git updates with a visible next step; mixing artifacts from different builds is unsupported.

For Docker, Podman, and Kubernetes image replacements, see Upgrading container images. The entrypoint starts the Gateway directly; boot migrates supported state in place.

For distro packages and image-based systems (bootc, rpm-ostree), see System-package and image-based installs. Nothing OpenClaw-managed runs Doctor for these, and an image-based host starts the Gateway on the new release before anyone can.

Before upgrading, follow the preflight checklist. Before a significant update, create a verified backup. Automatic config copies and migration recovery originals are not a full-state backup.

Linux system service run by another account

A common Linux layout has an administrator-managed global npm package owned by root and a systemd system unit whose User= is a service account, with the service's state in that account's HOME or in the unit's OPENCLAW_STATE_DIR. For this layout, run the update as root:

bash
sudo openclaw update --yes

When the installed system unit can be identified as running this package under another account, root replaces only the package and restarts that unit. This package-only branch does not open OpenClaw databases, run Doctor, create a state snapshot, or record an update run. CLI bootstrap can still load the selected state directory's .env before this branch runs. The service's own boot, running as User=, migrates its state and converges plugins. The unit's environment, profile, state selectors, and file ownership stay unchanged.

Before replacing the package, the CLI runs only the unit's recorded runtime's --version through runuser as the service account, without its loader environment. An incompatible runtime or failed probe refuses before replacement, with the cause and the runtime change needed. runuser from util-linux must be installed.

The CLI checks that systemd reports the unit active and prints the commands to inspect the service. It does not assume HTTP when TLS is configured only in the service's state: active does not prove that startup migration has completed.

bash
sudo systemctl status openclaw-gateway.servicesudo journalctl -u openclaw-gateway.service

Use the installed unit's name if it differs. With --no-restart, only the package is replaced; the CLI tells you to restart and check the unit yourself. This package-only path does not change the service's saved update channel. Older installed updaters can still refuse this layout and print manual recovery guidance. Non-root cross-account updates remain refused.

If a wrapper script replaces the unit's ExecStart, the updater may not be able to identify which installation it runs. A root update then refuses before package replacement or state maintenance and prints the stop, install, reset-failed, and start commands for that unit. Follow those commands and the backup steps below; the updater does not interpret the wrapper or change the unit.

Before a significant update, create a verified backup as the service account with its existing selectors (see Before updating).

Older installed updaters

If an older updater refuses this layout before installing the new package, do not repeat the same update command. Older installed updaters (2026.11.11 and earlier) can leave an empty /root/.openclaw folder that is safe to delete.

Replace the package manually:

  1. If that run explicitly selected the service's state, its log or report may now belong to root. Give those files back to the service account before making the backup:

    bash
    sudo find /var/lib/openclaw/.openclaw -xdev -user 0 -exec chown openclaw {} +
  2. Create a verified backup as the service account, preserving the unit's home, state, config and profile selectors:

    bash
    sudo -u openclaw env HOME=/var/lib/openclaw OPENCLAW_STATE_DIR=/var/lib/openclaw/.openclaw \  openclaw backup create --verify --output /var/lib/openclaw
  3. Stop the service, replace the package with its owning package manager, then start and inspect the existing unit. For npm (omit --allow-scripts=openclaw on npm 11.15 and earlier):

    bash
    sudo systemctl stop openclaw-gateway.service &&  sudo npm install -g --prefix /usr/local openclaw@latest --allow-scripts=openclaw &&  (sudo systemctl reset-failed openclaw-gateway.service || true) &&  sudo systemctl start openclaw-gateway.servicesudo systemctl status openclaw-gateway.servicesudo journalctl -u openclaw-gateway.service

    Under npm 12's default script policy, --allow-scripts=openclaw is required: without it, npm exits 0 but leaves the install incomplete. Stop the service before replacing its package so the running Gateway cannot lose its shutdown code or restart into a partly written package. An earlier failed update can leave the unit in systemd's start-limit-hit state, which refuses start; reset-failed clears that state before starting the service. The service starts only after the install succeeds, and start runs even if reset-failed reports an error. Expect downtime for the install and startup migration; the duration depends on the package installation and the service's state. If the install is interrupted, run the same commands again.

Substitute the actual account, paths, package manager, global prefix or project, requested target, and unit name. Retain the verified backup until the updated service is healthy. For pnpm and Bun, preserve both the global project and the configured launcher/bin directory; do not rely on sudo's defaults.

Gateway startup migrates configuration and database schemas in the selected state directory, so no separate state copy, Doctor run, or account adoption is needed. Do not run openclaw doctor or openclaw update repair as root against the service's state. Reinstalling the previous package alone does not undo a schema migration made by the new Gateway; to go back, restore the verified backup with it (see Rollback and recovery).

Local packaged-code overrides

Prepared-release updates currently refuse --reapply-local-overrides instead of silently discarding trusted local dist edits or using a second activation path. Save your edits outside the installation, run openclaw update without the flag, then reapply the overrides by hand to the selected release. Keep the saved edits until you have verified the updated Gateway; automatic rollback restores the previous release, not manual edits made to the new one.

Update implementation contract

Update, Doctor, service lifecycle, migration, and plugin-loading changes must keep these invariants. Implementation details and rationale are optional background, not required reading.

  • One update owner. src/update/ owns Git and global npm, pnpm, and Bun release updates; Gateway update.run and openclaw update use that owner. Keep one owner per responsibility, and ask before new config options or intentional schema, durability, retention, or permission changes, as required by AGENTS.md. Owners: AGENTS.md, src/update/AGENTS.md, src/update/run.ts, src/update/store.ts.
  • Prepare while the old Gateway serves. Prepare the candidate separately and check it at its serving path with its own loader; candidate checks must not write live state the running build still reads. Do no update work in the stopped-Gateway window: work needing the new build runs in that release. Owners: src/update/run.ts, src/update/check-release.ts, src/update/check-release.test.ts.
  • Keep service ownership. Revalidate the selected installation and native service before activation, keep a resident-launcher-owned service on that owner, and leave node-only package installs on their existing update route. Owners: src/update/convert-service.ts, src/update/convert-service.test.ts, src/update/cli.system-service.test.ts.
  • Preserve the launcher boundary. The launcher's frozen fields and trial IPC are pinned by src/update/frozen-contract.test.ts; launcher format or IPC changes are protocol/version bumps and need explicit approval under AGENTS.md. The IPC listener must not keep a stopped Gateway alive. Owners: src/update/launcher.ts, src/update/gateway-trial.ts.
  • Let the launcher settle trials. Commit only when the selected target reports ready with its recorded build identity; exit 78 during a trial, two failed starts, or an exhausted trial budget triggers launcher rollback. State preparation and startup share the twenty-minute ceiling, with at most ten minutes after state preparation. Owners: src/update/launcher.ts, src/update/launcher.test.ts.
  • Migrate only after exclusive handoff. The old Gateway must stop and close its state readers, writers, and identity descriptors before the successor mutates live state; ordinary starts and trials use canonical in-place migration owners, not a new private-tree Doctor or file-swap flow. Owners: src/state/state-upgrade.ts, src/state/state-upgrade-databases.ts, src/gateway/server-close.ts.
  • Publish recovery before mutation. Before a reader-floor increase or repaired config write, durably record independent original images and the complete target-owned .restore manifest; retries reuse originals, and compatible schema steps need no database image. Refuse an uncovered raised-floor path before stopping the old Gateway and retain recovery for published targets without a manifest. Owners: src/state/state-upgrade-restore.ts, src/state/state-upgrade-restore.test.ts, src/state/state-upgrade-databases.test.ts, src/update/rollback-source.ts.
  • Restore only recorded state. Keep the restore manifest's existing {v:1,runId,files:[{live,preimage}]} contract: absolute paths, null preimages removed before image renames, and interrupted renames replayed from the same record; malformed records fail visibly. Never restore a stale backup over newer data. Owners: src/update/rollback-source.ts, src/update/frozen-contract.test.ts, src/infra/update-doctor-result.ts.
  • Keep database admission honest. Preserve exclusive custody, source-change checks, scoped migration integrity and foreign-key checks, full recovery-image verification, and each store's own schema admission. A quick or schema-only check is not full verification, and held or plugin-owned stores must not be checked as active agent databases. Owners: src/state/state-upgrade.ts, src/state/openclaw-agent-db-schema.ts, src/infra/sqlite-index-schema.ts, src/cli/update-cli/schema-preflight.ts.
  • Keep core and plugin results separate. Settle the core run at core readiness through the launcher's acknowledgment and the serving Gateway; run normal plugin maintenance only after core readiness and trial settlement. Plugin work uses its existing lifecycle and capability consent, reports its own warnings, and must not delay or rewrite core success, send a second notice, or trigger core rollback. Reload receipts hash the same JSON form as the installed-index writer; a record changed by another operation is still refused. Owners: src/update/gateway-trial.ts, src/gateway/stale-install.ts, src/update/plugins.test.ts.
  • Updates always work. Treat operator state as input, record recoverable failures as warnings, and refuse destructive work only for a named data risk with a visible next step; add no prompts. Every run must reach a recorded outcome naming the serving version, without claiming that restored files, a run ID, or an unavailable health probe prove a serving Gateway. Owners: src/update/run.ts, src/update/gateway-trial.ts, src/update/cli.ts.
  • Keep shipped-updater contracts. The installed updater runs first and cannot gain fixes from its candidate; preserve its candidate entry points, serialized command contracts, and existing execution authority. Fix a shared release-path defect in its current owner too. Owners: src/cli/update-cli/AGENTS.md, scripts/lib/update-compat-inventory.json, src/cli/update-cli/update-command-migrated-input.ts.
  • Prove the real upgrade. Behavior changes need an upgrade from latest stable through update-restart-auth or published-upgrade-survivor, plus one or two regression tests red on the base and green with the fix. The source-built release-update-survivor lane supplements, not replaces, published-driver proof; schema changes also need real launcher rollback, preserved seeded data, and the migration bulk-access gate. Owners: AGENTS.md, scripts/lib/docker-e2e-scenarios.mts, scripts/e2e/upgrade-survivor-docker.sh, .github/workflows/ci.yml.
  • Keep proof attributable. Record the tested commit, published baseline, route, native service definition, serving build, trial outcome, schema, and seeded data; installed-updater changes need T → T+1 → T+2. Cover Linux systemd and container, macOS LaunchAgent, and Windows Scheduled Task paths; missing proof is unproven and blocks stable release. Owners: scripts/e2e/lib/upgrade-survivor/release-update.mjs, scripts/e2e/lib/upgrade-survivor/schema-downgrade-run.mjs, .github/workflows/ci.yml.

Moved sections

Release updates

See Release updates in the optional background.

Uncovered database paths

See Uncovered database paths in the optional background.

Proof for update changes

See Proof for update changes in the optional background.

Recorded contract notes

See Recorded contract notes in the optional background.

Migration integrity checks

For migration integrity coverage and the installed-updater boundary, see migration integrity checks.

Retired tenant-container management

The experimental openclaw fleet command has been removed. Updating the host CLI leaves existing tenant containers, networks, mounted data, and registry records untouched; it does not update their container images.

Before updating, back up each tenant and record its container identity, runtime, image, ports, mounts, resource limits, and environment. Protect that record as credentials: container environments can contain Gateway tokens. Transfer lifecycle, image updates, backups, and cleanup to your Docker or Podman deployment tooling. Verify each tenant through its existing endpoint before retiring recovery copies or removing resources. Keep separate state and credentials for each trust boundary.

See container image updates, backups, and the downgrade limitation before changing images or restoring an older OpenClaw version.

Upgrading after a legacy Linux Gateway crash

A namespace-less Linux Gateway lock remains an explicit-recovery case. Candidate Doctor may report that it cannot verify Gateway ownership, even when the lock's matching SQLite lease is missing or expired, because lease expiry and host-local PID observations do not prove that a holder in another PID namespace stopped. Follow the explicit recovery guidance from a current OpenClaw CLI using the same state and profile, then retry the update.

If the old updater rolls back before the fixed CLI is available, keep the restored installation healthy and use the candidate or next installed CLI only for the inspected gateway recover-lock command. Do not remove the record while any container or host process might still be using that state.

Upgrading very old versions

Current Doctor can migrate pre-July cron jobs, Voice Wake settings, conversation bindings, and OAuth credentials directly. It archives obsolete delivery queues, plugin indexes, sandbox registries, and runtime notifications, preserving original bytes and reporting recovery instructions. Run openclaw doctor --fix; these JSON formats do not require an intermediate release. See Doctor state migrations.

The following bridge instructions apply to other retired formats and config keys.

For installations older than July 2026, upgrade to 2026.9.5 first, run its Doctor migrations, and then upgrade to latest. The bridge release still imports the old tasks/runs.sqlite, flows/registry.sqlite, and plugin-state/state.sqlite databases and pre-June plugin JSON state, repairs retired agent and channel config keys, and includes the old runtime aliases. The retired plugin imports cover Telegram, iMessage, Active Memory, Nostr, and Microsoft Teams; see legacy state migration. Current releases leave those retired state files untouched. If you already installed the latest version, Doctor stops before rewriting config that still contains these retired keys and directs you through the same bridge.

The retired same-file memory index (meta, files, and chunks) is also refused before current tables are created. Preserve the original state and configuration, then use 2026.9.7 to migrate a compatible copy of that index before retrying. Unrelated tables with these generic names remain untouched.

If a newer release has already upgraded your SQLite databases, use a compatible pre-update backup for the bridge. Older releases cannot open newer database schemas; follow downgrade recovery before running either bridge release against that state.

Back up the state first and use a supported Node version: Node 24.16.0+ on the 24.x line, or Node 26.1.0+. Node 24.22.1+/26.12.1+ is strongly recommended for security; older compatible releases warn without blocking the update. Keep the same owning account, installation prefix, profile, and state/configuration paths throughout.

For an npm installation with an OpenClaw-managed Gateway service, run this first stage from a terminal:

bash
openclaw gateway stop &&  npm install -g openclaw@2026.9.5 --allow-scripts=openclaw &&  openclaw --version &&  openclaw doctor --fix

Confirm that the version output is 2026.9.5 and that Doctor imported the old task, flow, plugin, and channel state you need. Resolve any failed or conflicting imports before continuing. Doctor imports channel state only for enabled channels and accounts. If needed, temporarily enable those channels while the Gateway is stopped, rerun the bridge Doctor, then restore their previous enabled settings. Install the affected plugins before running their migrations. Then install the current release with the manual update procedure. The Gateway is already stopped, and the backup above covers its first step.

The npm command above is for npm 12 or npm 11.16+; on npm 11.15 and earlier, omit --allow-scripts=openclaw. For a pnpm-owned installation, replace the bridge install command with pnpm add -g --allow-build=openclaw openclaw@2026.9.5. For Bun, use bun add -g --trust openclaw@2026.9.5. Keep any normal --profile selector on every openclaw command. For a custom service or foreground Gateway, stop and start it through its actual owner instead of the managed-service commands above.

Recommended: openclaw update

Detects your install type (npm, pnpm, Bun, or Git), prepares and checks a separate release while the old Gateway serves, then starts a rollback-protected trial.

Use openclaw update for an OpenClaw-managed installation. A configured local Gateway updates its own installation; without one, the CLI prepares the release itself. Externally managed installations retain their deployment owner.

A bare npm install -g openclaw@<version> uses the global prefix of the Node/npm selected by your shell. Switching Node versions can install a second OpenClaw without changing the service's entrypoint. openclaw --version then reports only the shell's CLI version. Check openclaw status, openclaw doctor, or openclaw gateway status for both install roots and versions, then run openclaw update or use the CLI from the service's install root. Changing only the Node executable in a service definition does not update its OpenClaw package.

bash
openclaw update

Host prerequisites

Before preparing a release, the updater checks that Node satisfies the target's requirements, required tools are available (Git for source builds, npm for packages), and the installation filesystem has at least 1.4 GB free. Refusals name what to install or free.

On macOS, if the updater selects /usr/bin/git and there is no active developer directory, run xcode-select --install to install the Command Line Tools or select an installed Xcode, then retry openclaw update.

The old Gateway keeps serving during preparation. State migration happens when the new Gateway starts, through the canonical in-place schema owners, not through a private rehearsal or an in-place package swap.

Updates stop Gateways, not node services. The update Doctor needs exclusive access to state/openclaw.sqlite, and a running node host service using the same state directory keeps that database open. The update then refuses before it stops the Gateway or changes anything, naming the database and the node service PID. Run openclaw node stop, rerun openclaw update, then run openclaw node start. The installed updater must contain this check. Older updaters fail in Doctor with database is locked and refuse rollback; run openclaw node stop, then openclaw update repair, then openclaw node start.

Every attempt ends with one update run record. Its cause is one of none, node-unsupported, git-unsupported, disk-full, permission-denied, network, config-invalid, install-failed, state-migration-failed, plugin-failed, service-failed, interrupted, refused or unknown. Reports print it as Cause:. It is a closed set, so redaction never hides it. openclaw update status --json shows it as lastRun.origin.cause.

Starting with the release that adds candidate-owned admission, package updates privately stage the target and let its code judge configuration, database schema, Node requirements, and plugin availability before activation. Later releases can therefore correct these admission decisions for users already on a supporting updater. The installed updater retains managed-service ownership and ancestry checks and every mutation. Older installed updaters keep their pre-staging refusals; a newer candidate cannot repair that first hop. Targets without the capability marker fall back to installed checks, as do --admission installed and --dry-run (which never stages a package). Admission selection is CLI-only: --admission auto is the default, and there is no environment-variable override.

Windows candidates accept lease identities from the 2026.9.6 updater even when NTFS file IDs exceed JavaScript's exact numeric range. After validating the handoff, the candidate retains exact file and parent-directory identities; later replacement still stops the update. Lease read failures report their underlying cause instead of a parent-binding mismatch.

Service backups and interrupted agent cleanup also retain exact file identities. Older rounded receipts remain readable and upgrade after verification on their next write.

Post-install Doctor also accepts older updaters, including 2026.8.2, that do not provide an update run ID. Its commands retain invocation-specific custody without requiring an environment-variable workaround.

Doctor keeps a command's captured birth identity through native custody binding. If a command finishes before that identity can be captured, its original spawning owner still joins the command and confirms its process group has exited before releasing the reservation. A live or unreadable command remains protected.

When the installed 2026.9.2 updater runs the candidate's early Doctor check, shared-state and agent schema changes are rehearsed on private copies. Plugin inspection cannot publish native admission metadata to live state during this check. A refused rehearsal leaves live database schemas unchanged for package rollback; successful checks defer migration to the fresh post-core updater.

Managed-service inspection is best effort. If the service manager is unavailable, including Linux hosts without systemd, the update continues and records a warning. It leaves unverified service definitions unchanged and skips their automatic restart. Restart the Gateway you launched manually after the update, or use its actual supervisor. Doctor still checks for active state writers before migrations.

Git updates also check persisted Gateway ownership before replacing checkout or runtime files. When native service discovery misses a live or unverifiable owner, the update continues with a warning in the terminal, JSON result, and update history. The warning names the PID and installation root when known: the Gateway keeps running the previous runtime and may fail to load lazily loaded chunks until restarted. A Gateway that detects replacement of its runtime may stop itself and require relaunch. Restart it through its actual service manager, or press Ctrl+C in its original terminal and rerun its Gateway command. Positively identified disjoint installations stay silent. Existing managed-service and database-capture refusals still apply. The installed update driver must contain this warning behavior; a newer candidate cannot change an older driver's publication behavior.

On Linux, unmask a managed systemd unit before updating. A masked unit (masked or masked-runtime), RefuseManualStart=yes, or a disabled and inactive unit with no start path causes preflight to refuse before replacing files or running migrations. For the default user service:

bash
systemctl --user unmask openclaw-gateway.serviceopenclaw update

Use the unit and scope reported by openclaw gateway status --deep for a custom profile or system service. If an operator applies a mask or another start restriction during the update, OpenClaw retains the activated candidate and reports a service-definition warning instead of rolling back because systemd refused to start it. Gateway readiness is still unverified; remove the reported restriction, run openclaw gateway start, then check openclaw gateway status --deep. These checks belong to the installed updater; unmask before updating from an older release too. See Linux maintenance holds.

Service membership uses the running Gateway's process ancestry and native supervisor facts. An external terminal that inherited service environment markers can still update after native membership is verified as external. Reparented children remain inside when they share the Gateway's macOS process group or launchd job, or its systemd unit cgroup. On macOS, verified external launchd membership is sufficient even when a root-owned login process prevents a complete ancestry walk, including in integrated terminals. An already-current core update never refuses for service membership. When membership cannot be verified as external, it completes with already-current and a warning that plugin, runtime, and service maintenance was deferred, before that maintenance can change files or stop the Gateway. An explicit channel change is also left unapplied and named in the warning so it can be retried. Real updates retain the containment checks. Present but unreadable native membership refuses with service-membership-unverified; confirmed native membership uses inside-gateway-service. Windows currently uses verified ancestry and the inherited-marker fallback because job-object membership is not available to the runtime. A genuine Gateway descendant must use the managed update handoff or an independent terminal.

Linux supports both cgroup v2 and the named systemd v1 hierarchy. When readable native observations establish that this host has no service containment tree or launchd job, a complete external ancestry walk and a distinct process group allow the updater to stop, update, and start the managed service itself. The service definition must still belong to this installation. The report and openclaw update status --json record a warning: Service membership unverifiable on this host; using managed stop/update/start.

Permission failures, conflicting, incomplete or malformed observations, and known service members do not use this fallback. Reparented callers in the Gateway's process group remain inside even when there is no native unit tree. When native facts exist but cannot be read, run this sequence from an interactive external shell not started by the Gateway service, under the installation's owning account:

bash
openclaw gateway stop && openclaw update --yes && openclaw gateway start

Stopping the Gateway removes the live containment ambiguity. Keep the same account, profile, and state/configuration paths throughout, and repeat any requested --channel or --tag on the update command. If the update reports an error, follow its recovery guidance before starting the Gateway. With native helper support, openclaw gateway call update.run --params '{}', the Gateway tool's update.run action, and /update can instead perform a managed handoff. Linux transient user handoffs require systemd-run; an emulated manager without it cannot use that route. See Automation and SSH.

Managed-service refusals retain a specific code, such as inside-gateway-process-tree or service-definition-changed, in the failure report and openclaw update status --json. Shared reports preserve that code and recovery guidance while removing private paths and process IDs. These checks run in the installed updater: a new candidate cannot repair an older driver's refusal before package replacement, or recover detail an older report already discarded.

Package-swap reports distinguish package-recovery-permissions-unsafe (recovery artifact permissions or link count) from managed-handoff-lease-identity-changed (a recorded lease database path, file, or parent directory changed). Shared reports retain these closed reason codes while redacting private diagnostics. Other package failures keep the global-install-failed reason. These diagnostics do not change refusal, backup, or rollback behavior and require an updated driver.

Generated failure reports name recognized candidate startup causes, including plugin loading, port conflicts, schema migration, native-module compatibility, readiness timeouts, and process signals. Plugin names appear only when they belong to the shipped public catalog. Config errors retain schema field names and fixed validation kinds; user-defined map keys become <id> and unknown keys become <key>. Arbitrary error text and rejected values stay out of public reports.

Control UI updates use a verified helper to stop and restart the managed Gateway. On macOS, the helper carries its live update ownership into LaunchAgent activation; ordinary commands inside the Gateway still cannot stop their own service. If an older installed updater reports managed-service-stop-failed before activation, the candidate has not replaced that updater. Update from an external terminal using the same installation owner, then retry the Control UI update.

After package replacement, compatibility config reads from older updaters run in a fresh process using the updated package and its dependencies. This also applies to updates driven by 2026.9.4. If an optional read fails, the updater prints candidate-config-read-failed with the reader's error or exit reason and leaves the service definition unchanged. The reader's stderr is not echoed. Reads follow the restored package after a rollback. After the update finishes, inspect the reported problem with the updated CLI, then run openclaw gateway install --force with the same --profile or --dev option as the update to refresh the service definition. Node and Bun readers run only one child per read. An attempted nested reader stops before spawning and records candidate-config-read-recursion. Both runtimes use the same result channel for synchronous and asynchronous reads; config diagnostics stay separate from the result.

Bun-hosted updates from 2026.9.7 can finish candidate Doctor and restart the Gateway after package replacement. Idle candidate workers release their IPC references after native work closes, so a completed Doctor does not leave the installed updater waiting indefinitely for its exit. This fix runs in the updated package; the published updater and its handoff markers are unchanged.

After a native service starts, restart preparation allows its verified process up to the normal startup deadline to replace missing or dead Gateway ownership before signaling it. This avoids an intermittent restart-unhealthy result when an older updater starts the updated service before asking the new installation to restart it. The fix runs in the new installation, so it also applies to the next update from 2026.8.35. Missing ownership after the deadline and unrelated process locks still refuse the restart.

The running Gateway retains its shutdown code before an in-place update can replace the package's bundled files. Transcript shutdown drains captures and persists rule-based notes without starting optional model inference. This protection applies to updates from a release containing the shutdown fix. Older running Gateways, including 2026.9.6, can still fail their first shutdown with ERR_MODULE_NOT_FOUND after package replacement; installing a fixed candidate cannot change code already running in that process. Start the updated Gateway with its installation owner if the old process exits without restarting. The retained shutdown code includes restart-marker persistence and subagent settlement. Running 2026.11.5 and 2026.11.6 Gateways load both only at shutdown, so after an in-place replacement such as openclaw update --no-restart they can fail that shutdown without recording which interrupted sessions to resume.

When a writable managed Node Gateway service points at another global installation, the update keeps the active CLI's installation as its target and refreshes the service through gateway install --force before verifying the restarted Gateway. The old service command remains the recovery identity until that handoff succeeds. Reconciliation failures are recorded as warnings with a manual repair command. The code update can report success while service reconciliation remains pending; a stopped service stays stopped until repaired. On Linux, regeneration preserves the order of retained PATH entries and prepends newly added managed entries. Paths carried over solely from the old definition still pass the existing safety filters. If the definition cannot be preserved, reconciliation requires manual repair. Named environment-only overrides do not prevent this convergence: the updater rewrites the managed base definition and leaves the operator's drop-ins in place, including when restoring the original service after a failed update. Launcher overrides, environment resets, and overrides that cannot be fully inspected keep the service-root update route. The installed updater must contain this selection fix; downloading a newer candidate cannot change an older updater's initial target. Deployment-owned definitions retain their existing installation owner.

If a service override keeps the Gateway on a different installation, only that installation is updated. Your shell CLI stays unchanged and may no longer support the shared config or plugins. Use the Gateway's CLI, or update your shell CLI to the same version.

Reinstalling cannot replace a custom launcher override. Doctor reports this even when it cannot begin repairs. To change a systemd ExecStart override:

  1. Run openclaw gateway status --deep to find the service.
  2. Inspect it with systemctl --user cat openclaw-gateway.service.
  3. Update or remove the launcher override, keeping unrelated settings.
  4. Run systemctl --user daemon-reload. If needed, reinstall from the CLI you want the Gateway to use, then check its launcher and health with openclaw gateway status --deep.

For system services, omit --user; for profiles, use the reported unit name. These warnings require an updated CLI; an older updater still uses its old routing.

An owned managed Bun Gateway at a different package root uses the existing service-root update route: only the Gateway installation advances, and the invoking CLI installation stays unchanged. The updater validates the service's actual Bun executable against the Bun 1.4.4+ and WAL-safe node:sqlite requirements; Bun's emulated Node version is not checked against engines.node. If the updater runs on Node, its Node must also satisfy the target package's engine and SQLite requirements before package replacement, because finalization uses that runtime. Bun-owned package-manager checks and installs use that verified executable, and the existing install/restart path retains the recorded runtime pin. A path under ~/.openclaw alone does not establish Bun package-manager ownership. See Bun-only installs.

Doctor and openclaw update repair do not move a Bun Gateway onto a different CLI installation. A repair invoked from that other installation reports the drift and refuses service maintenance before stopping the Gateway. Run repair from the Gateway's own installation, for example <bun> <service-root>/openclaw.mjs update repair, or use openclaw update to advance its installation in place.

The installed updater runs first. In a Linux split-root fixture, published 2026.9.6 refused early with ENOENT when Bun was absent from PATH, leaving the Gateway and both installations unchanged. With the fork Bun on PATH, that published driver updated the Gateway installation in place and restarted it healthy while leaving the invoking CLI unchanged. The routing and explicit Bun selection described above apply only when the updater driving the update contains this fix. Installing a newer candidate cannot change that first hop.

Pending package-publication recovery in either the CLI or selected service installation is checked before writable preparation. The updater settles a leftover operation itself when that is safe (see Unfinished publication and rollback); other unfinished operations still require the reported recovery command. Doctor does not clear those artifacts.

During an uninterrupted package update, the freshly installed private candidate is checked by directory identity, package version, and launchers instead of repeated full-tree scans. Content changes inside that private candidate during publication are not detected. Its full fingerprint is retained for recovery; resumed publication and repair still verify package contents. This optimization applies when the installed updater contains it; older updaters keep their checks.

pnpm updates use the installation's own pnpm home and bin directory, even when macOS service PATH excludes pnpm or a version manager puts another pnpm first. Both pnpm 10's home-level shim and pnpm 11's bin/ shim are supported, and the child PATH includes both locations. The installed updater must contain this fix; installing a newer candidate cannot repair an older updater's preflight.

Native pnpm updates also relocate pnpm launcher paths before publishing them. Each shell word is rewritten by value, so every quoting form pnpm writes is covered, including the quoted "$basedir_abs"/'<target>' form and paths that contain ', ", $, spaces or backslashes. A staged launcher that still points into the update stage stops the update before the Gateway is stopped; the message names the direct pnpm reinstall and openclaw triage. After activation, a published launcher whose target does not exist fails the update, and the package transaction restores the previous launchers. A launcher format the updater cannot read only produces a warning with repair guidance. A pnpm package update also restarts the Gateway on the new version even though pnpm moved the package to a new versioned store directory. The updater that is already installed runs these steps, so updates driven by 2026.11.4 through 2026.11.9 do not get them.

When 2026.11.4 through 2026.11.9 updates a pnpm install with a managed Gateway service to a release with this fix, it still publishes a launcher that points into its removed stage. The new package's Doctor, which runs during that update, repairs the launcher, so the openclaw command keeps working. These updaters hand the later update steps, including the Gateway restart, to the new package only when the update migrates the database schema. Otherwise they refuse the restart (service-revalidation-failed) and leave the Gateway stopped. When the service is this installation's own and still names the previous version's package, Doctor reports the recovery during that update, and openclaw update status and openclaw gateway status --deep name it afterwards: run openclaw gateway install --force, then openclaw gateway restart. openclaw gateway restart alone fails in that state, because the service still names the previous version's store directory.

If openclaw still points into a missing .openclaw-update-native-* directory, the new package's Doctor and Gateway startup repair it. They rewrite a launcher whose cmd-shim-target names this installation and whose stage directory is gone. Only a launcher owned by the account running the repair is rewritten, and set-ID bits are not kept; another account's launcher is left unchanged and reported with the reinstall command. This automatic repair runs on macOS and Linux only; on Windows, use the reinstall steps below. If the Gateway is also down and no new code has run yet, reinstall the same version with pnpm add -g --allow-build=openclaw openclaw@<installed-version> using the same account and global directories, then run openclaw gateway install --force and openclaw gateway restart. Back up first and follow the manual package-manager procedure.

If a pnpm-owned install fails with IO error: not a terminal, the installed updater may be triggering an interactive pnpm build-approval prompt while capturing its output. A newer candidate cannot repair that first update. Follow the manual package-manager procedure, preserving the owning account, prefix, and state/configuration. Back up and stop the Gateway through its actual owner before replacing the package. For the installation step in a POSIX shell, supply noninteractive input:

bash
pnpm add -g --allow-build=openclaw openclaw@VERSION </dev/null

Replace VERSION with a release containing this fix. Then run Doctor and restart through the same owner as described in the manual procedure. Updates driven by the fixed version supply noninteractive input to pnpm themselves. The recovery command permits OpenClaw's own install scripts without approving additional dependencies.

The installed 2026.9.4 updater can refuse with managed-service-preflight before the target code runs. To reach a release containing this repair, use the manual package-manager procedure with the same owning package manager, prefix, and state/configuration. Back up first, stop the Gateway through its actual supervisor or foreground process owner, replace the package, run Doctor, and restart through that same owner. --no-restart cannot repair the old admission check.

Updaters without the admission fix first shipped in 2026.7.2-beta.5, including 2026.6.34–2026.6.35 and the 2026.7.33–2026.7.35 extended-stable line, refuse before staging with plugins.load.paths: plugin path not found when a configured plugin path is missing. Restore the custom plugin directory or remove its configured path, then update. openclaw doctor --fix repairs recognized bundled-path aliases but preserves unrelated custom paths.

Registry package updates inspect the exact target's Node requirement before staging or running package lifecycle scripts. An incompatible Gateway runtime produces preflight-node-runtime-incompatible, with the target version, required engine range, selected Node version, and an upgrade command. The updater prefers the inspected managed service's Node executable. A compatible service Node is retained even when a different Node on PATH cannot run the target. If the service's runtime has changed (for example, a Homebrew symlink now selects another version), an owned, writable service can use a compatible updater or PATH Node when the update will refresh its definition. Refusals name the service and updater runtimes, the PATH executable, and the inspected Gateway installation root. A protected definition or --no-restart still requires its pinned runtime to be compatible; changing the shell's Node alone does not change that service. The updater keeps the requested OpenClaw target and does not select another release automatically. Later runtime capability checks can still produce node-runtime-preflight. This selection repair must be present in the installed updater. A 2026.10.7 driver that refuses before staging cannot obtain it from a newer candidate; use the manual package-manager update once, preserving the installation owner and service account/state selectors. If the managed helper exits before acknowledging startup, the update report includes a bounded, redacted tail of its startup errors. The Gateway keeps serving. This diagnostic capture must be present in the installed updater; a newer candidate cannot repair an older updater's missing startup diagnostics. npm directory permission failures produce global-install-permission-denied, naming the directory, its owner when available, and the next action. Dry-run JSON includes these outcomes in failures; the update report and Doctor's update history retain recorded failures. The serving Gateway stays in place during these preflight checks.

After an external reinstall changes the OpenClaw installation root, such as installing a newer Node version with nvm, mise, or Homebrew and reinstalling OpenClaw, Gateway startup repairs managed plugin host links before checking plugin availability. Stale or dangling links are rebound to the current installation, with a warning showing the old and new targets. Developer-owned path installs and links outside the plugin system's owned locations are left unchanged. If filesystem permissions prevent repair, startup reports the affected plugin and keeps it unavailable until the links can be repaired with openclaw doctor --fix.

System-package ownership inspection treats missing package-manager executables as inapplicable without warning. Unavailable backend results are reused across update phases of one update run and command search path; other query failures warn once per run. The next update always probes again, including in a long-lived Gateway. Successful inventories stay fresh before installation effects to protect files claimed by a system package manager. This behavior requires the updated updater.

Directory permission checks remain in the installed updater. Older updaters cannot gain new admission behavior from the candidate they have not staged yet. If upgrading from an older release, check Node requirements and the npm prefix's permissions first; see update troubleshooting.

An already-installed registry package version or Git target SHA still runs plugin maintenance, repairs eligible old OpenClaw release pins, and restarts a running managed Gateway when plugins change or its service points at another installation, unless --no-restart is set. Unchanged runs finish as skipped / already-current.

Plugin failures never fail an update. If a plugin cannot be updated, OpenClaw continues with the remaining plugins, keeps the previous installation where possible, and prints a short next action. A plugin that cannot load (for example, one built against an older plugin SDK) stays off for that Gateway boot while the Gateway serves; its config and data are kept, and the next start or update retries it. openclaw status shows it in a Plugins not loaded row and openclaw doctor names the load error. Gateway restart and readiness checks, including the gateway restart an updater runs, never count plugin load errors as unhealthy, and plugin-owned Doctor checks do not gate the post-plugin readiness pass. Pending plugin data migrations stay warnings. Individual plugin outcomes remain available in --json output. When ClawHub has not published a version-matched official runtime plugin, the updater tries its declared trusted npm source for that same version, honoring catalog pins. Security and integrity refusals do not permit a source fallback. If neither source can serve the release, a compatible working installation stays in place with a version-skew warning and an openclaw plugins update <id> retry instruction.

Unfinished plugin migrations retain their settings and state inputs while plugins install, plugins update, doctor --fix, and update repair repair the package. A verified replacement can be installed before its remaining data migration completes; pending migration still guards runtime activation. Explicit config unset plugins.entries.<id> can remove that entry, with the normal config backup preserved. Removing the entry does not settle its pending data migration.

Failures to install core, repair required configuration or state, or start the updated Gateway remain update failures, except for the service-definition refusals described above. Local copies selected through plugins.load.paths are operator-managed. Updates and openclaw update repair retain the selected copy and any npm install it shadows, and record a plugin-operator-managed warning in the outcome and update history. Verify that copy against the updated OpenClaw version, or remove its path from plugins.load.paths to use the managed installation again. This does not grant the local copy trusted plugin privileges. An explicit package artifact (for example, a tarball path or URL) is validated and installed even when its version matches; matching versions do not prove that two artifacts contain the same code. An explicit --channel choice still becomes the saved update channel. For versions that support checks before installation, health checks, config and plugin planning, and a test Gateway boot on copied state finish before the service stops. The stopped interval contains the swap, required migrations, plugin downloads and convergence, and service start. Plugin work uses the installed target without requiring a serving Gateway. Changed plugins, pending plugin migrations, or deferred model retirement run fresh Doctor repairs before restart; required repair failures still block startup. After the candidate takes ownership of finalization, optional diagnostics with complete lint coverage can run after verified readiness. Their warnings and retry commands remain in the update report while the Gateway serves. Missing diagnostic selectors cause the checks to run before startup instead. If post-plugin lint execution cannot finish because of lock contention, a timeout, or an inspection failure, the verified core update continues with a recorded warning and the original lint diagnostics. Run openclaw update repair to retry those checks, stopping the Gateway first when the repair asks for exclusive state access. Concrete readiness findings and unverified process cleanup still block completion. The final report records downtime through convergence and final verification, plus verification results. See Validation and activation for the checks.

Post-update configuration and settlement reads wait for temporary SQLite maintenance custody within the existing update allowance. If that wait expires, contention alone preserves automatic Gateway recovery; an actual data-at-risk refusal still blocks recovery. Doctor publishes its completion result only after its maintenance resources have been released.

Gateway process respawn and launchd restart scheduling respect active offline maintenance ownership. During Doctor restoration, a busy port still refuses an unverified listener, but the preserved LaunchAgent is reloaded so launchd can retry after that listener exits. This requires the Gateway and restoring CLI to contain the fix; an already scheduled restart helper is not cancelled by it.

Source updates also admit build-artifact ownership and runtime staging access in the installed checkout before stopping the Gateway. A retained .artifacts/dist-artifacts.lock refuses the update with the recorded owner, timestamp, and exact recovery command while the serving Gateway stays running. Verify that all associated build/check processes, including detached descendants, have stopped before releasing that lock; a dead owner PID alone is insufficient. The updater keeps that ownership until its work has settled and carries the prepared runtime result into completion. Already-current repairs reuse the admitted ownership; promoted runtime outputs do not need regeneration. Published updaters that pass the source build-cache location, including 2026.9.6, also receive the installed-checkout check during candidate builds.

Git updates support a .artifacts directory redirected by a symlink, including to another volume. Database snapshots use its physical directory so the backup's parent-directory durability check can complete. The installed updater must contain this fix; a newer candidate cannot repair an older updater's capture.

Current updaters do not boot a candidate canary before activation; they load the candidate's recovery runtime and prove Doctor and Gateway startup after activation, with rollback (see How updates run). Older installed updaters still run the canary described here against this version. The canary uses a temporary loopback Gateway port and suppresses background listeners, including the MCP Apps sandbox, browser control, and channel services. This lets validation run while the serving Gateway keeps its configured ports. Doctor and policy checks use the copied deployment settings, so an accepted policy attestation remains valid for an unchanged deployment. Only after these checks finish does the canary apply its temporary token, disable Tailscale and Control UI, and suppress background services for Gateway startup. Genuine policy drift still fails validation; no attestation pin is changed or skipped. The updater running the rehearsal must contain this fix; a newer candidate cannot undo configuration overrides already applied by an older updater. Doctor omits the onboarding URL warning derived from that temporary loopback binding during rehearsal; other findings remain visible. The activated Gateway retains your normal listener settings. Candidate startup progress is emitted only when the driving updater announces support, so older updaters, including 2026.9.5 and 2026.9.6, retain actual startup errors instead of mistaking a progress marker for the failure reason. While waiting for canary HTTP readiness, the updater observes live update authority about once per second. Cancellation, process exit, and startup deadlines remain checked at every poll. Authority is checked again before accepting each ready endpoint or recording a startup warning. Revocation may therefore take about one second to stop an idle wait, without authorizing an intervening effect. The updater running the canary must contain this change; a newer candidate does not change an older installed updater's polling.

The internal progress-capable launch repeats the existing --update-canary boolean marker; legacy launches contain it once. This is an internal updater-to-candidate contract, with no operator configuration setting. Startup failure reports retain the last meaningful stderr diagnostic and the end of bounded log lines, with secrets redacted. Canary progress markers do not replace the failure reason. The installed updater owns this reporting, so an older updater can retain its earlier diagnostic behavior on the first update. During private rehearsal, exec SecretRef providers are deferred and their owners start cold with a recorded warning. Provider prerequisites such as a 1Password service-account token stay in the serving state directory; rehearsal does not copy them or run a resolver against that directory. SecretRefs remain references in the copied configuration. Credential availability is checked by the normally activated Gateway. This repair must be present in the candidate; it also applies to older updaters that supply the complete private-rehearsal environment.

The canary verifies the copied plugin payloads without downloading replacements. It warns when plugin refresh is deferred; live update finalization owns that refresh, so a slow registry cannot consume the canary's startup budget. This candidate-side behavior also applies when the installed updater is 2026.9.3. That older updater still caps the entire validation sequence at five minutes; its --timeout option cannot increase this cap.

Plugin rehearsal copies are temporary and rebuilt after interruption. Copying uses up to four concurrent file copies and avoids a disk flush for every file. Failures to remove private candidate copies or Git inspection worktrees are warnings that identify the cleanup path and error class. They preserve the original candidate result and the installed runtime's recovery verdict. Unverified process cleanup still requires its recovery owner. If a copy fails, active copies finish before cleanup; link publication and verification run only after all file copies succeed. Each private copy or inspection uses one generous absolute allowance derived from its inventoried size, with the caller's larger allowance preserved. Progress remains diagnostic and does not renew the allowance. Exceptionally slow storage may require another update attempt after a visible timeout. Stored state and recovery backups retain their existing durability guarantees. An older installed updater keeps its initial snapshot behavior until you launch an update from the newer version.

Candidate Doctor accepts plugin dependencies inside the private rehearsal copy or the staged OpenClaw package, including its nested node_modules. Private host links deliberately target that staged package; on Windows these are junctions. Containment applies to references from the private plugin copy. The trusted candidate's own dependencies retain their package-manager resolution, including hoisted dependencies and installation-local stores. Plugin entries and repair writes remain private-only, and private dependency links into the serving installation or user directories remain rejected. The candidate must contain this fix; older installed updaters need no new marker or protocol.

Candidate validation uses separate size-aware allowances for snapshots and each runtime check. Slow snapshots and Doctor no longer consume the next check's allowance or trigger an additional 30-minute limit for the whole validation. An explicit --timeout still bounds the overall update from admission; phases do not reset it. Cancellation settles accepted child processes and writers before recovery. This correction must be present in the installed updater; staging a newer candidate cannot change the older driver's validation deadline. Update-history writes retry a timed-out commit admission at most three times, releasing the SQLite writer between attempts. Ordinary progress that still cannot be recorded, including a worker queue-capacity refusal before dispatch, produces a warning and validation continues. Snapshot progress keeps one write in flight and coalesces pending observations to the latest progress. Required recovery and terminal records report a failure instead of retrying forever. These limits apply when the newer installed updater runs; staging it cannot change an older driver's already-running progress writer.

If the 2026.10.4 updater stops with candidate-snapshot-failed and SQLite worker queue capacity reached, staging a newer candidate does not replace that progress writer. Preserve a verified state backup and follow the manual package-manager procedure to install a release containing the fix, stopping and starting the Gateway through its actual service owner. Keep the same account, installation prefix, profile, and state paths; do not delete databases or disable consistency checks.

Runtime retention looks for hoisted dependencies within the package manager's owning installation. Missing optional peers do not cause it to copy unrelated ancestor installations. Explicitly linked dependencies retain their own resolution. This improvement applies after the newer updater is installed; it cannot shorten the retention phase already running in an older updater.

Post-activation schema inspection preserves captured SQLite database, WAL, and shared-memory artifacts so the final Doctor can verify the same migration source. A Git checkout update that switches the release link runs no Doctor before activation. Its schema inspection reads each agent and local store's schema version directly, in milliseconds and without a copy, even while the serving Gateway writes. The shared state database keeps its consistent online-backup read.

Release-managed Gateway startup applies supported SQLite and PostgreSQL state and agent migrations in place through the existing canonical owners. A step that preserves the derived minimum reader floor needs no image; one that raises it requires its recorded preimage before mutation. These same custody and migration owners apply outside a release trial. See PostgreSQL updates and schema migrations.

A Git checkout that runs from releases keeps each release at <state dir>/git-install/releases/<release>/openclaw, behind the link <state dir>/git-install/openclaw that the service's launcher starts. Each release is built and checked at that path, so the update proves the release loads from where it serves. Dev-channel installs on main builds from 2026-11-17 until this change (they report version 2026.11.5; no published release has the release layout) keep the link and releases under git-install/lib/node_modules/openclaw, where Node refuses to load a bundled plugin's TypeScript sources (#201874). When a web search provider is configured, their Gateway fails at startup.

The updater in a checkout built from main between 2026-11-17 and 2026-11-19 (it builds releases under git-install/releases/<release>/build) never rebuilds the checkout, so after a database migration neither it nor the checkout's openclaw command can open the migrated data. That updater runs first and cannot be patched. When the new release would migrate state, its own check stops that updater before the release is switched and finishes the update itself, on Linux with a systemd user Gateway service and on macOS with a launchd Gateway LaunchAgent:

  1. The check keeps the release the updater just built (it moves to git-install/recovery) and starts a recovery job that outlives the updater and the Gateway restarts: a transient systemd user service (openclaw-update-recovery) or a separate launchd job in your login session (ai.openclaw.update-recovery). The updater then reports this one update as failed; its output says the new release is finishing the update and how to follow it.
  2. The recovery waits for the updater to exit, fast-forwards the checkout's branch to the release's commit, and restarts the Gateway on the release the updater built, which migrates state at startup.
  3. It rebuilds the checkout (pnpm install --frozen-lockfile and pnpm build) while that release serves, then restarts the Gateway on the rebuilt checkout.
  4. It removes the older updater's link git-install/lib/node_modules/openclaw, its releases and the kept release, and records the outcome for openclaw update status.

The Gateway is down only for the two restarts: the first lasts as long as the boot migration, the second a few seconds. Until the rebuild finishes, the checkout's openclaw command may fail or refuse the migrated data. Follow the job with systemctl --user status openclaw-update-recovery and journalctl --user -u openclaw-update-recovery on Linux, or in <state dir>/logs/update-recovery.log on macOS. The definition of the Gateway service from before the recovery stays beside it with the suffix .before-update-recovery.

If the release fails to start before it migrated anything, the recovery puts the previous build back and it serves. If something fails after the migration (for example pnpm build in the checkout), the Gateway keeps serving the release, and the recorded outcome and the job's log name the one command that finishes the update, run from the checkout:

sh
pnpm install --frozen-lockfile && pnpm build && openclaw gateway install --force

Nothing in the checkout is reset, stashed or forced. The check prints the reason and the by-hand rebuild below instead, and changes nothing, when the recovery cannot run: another platform, no systemd user manager or no launchd login session, a Gateway service that is stopped or runs another installation, a dirty checkout or one that cannot fast-forward to the release, an openclaw command on PATH from another installation, less than 4 GiB free, no pnpm, or unreadable schema versions. Running openclaw update again stops at the same point with the same message until the checkout is rebuilt. Run the printed line once from the checkout. With the default state directory it reads:

sh
oc_link= && git pull --ff-only && openclaw gateway stop --force && pnpm install --frozen-lockfile && pnpm build && oc_link=$(readlink "$HOME/.openclaw/git-install/lib/node_modules/openclaw" || true) && rm -f "$HOME/.openclaw/git-install/lib/node_modules/openclaw" && openclaw gateway install --force || { [ -z "$oc_link" ] || [ -L "$HOME/.openclaw/git-install/lib/node_modules/openclaw" ] || ln -s "$oc_link" "$HOME/.openclaw/git-install/lib/node_modules/openclaw"; openclaw gateway start; false; }

The printed line names your state directory relative to $HOME. For a state directory outside it, the line starts by requiring OPENCLAW_STATE_DIR in the shell and changes nothing without it. On Windows the update prints the same steps to run one at a time.

With the printed line, the Gateway is down while the checkout builds. The older updater's release link (git-install/lib/node_modules/openclaw) is removed after the build, because while it exists openclaw gateway install binds the service to that updater's launcher, which keeps serving the old release. The reinstalled service then starts the rebuilt Gateway, which migrates state at boot. If a step fails, the command puts the link back if it had removed it, starts the previous service again and exits non-zero; a failed pnpm build can leave the checkout's build incomplete, so fix the reported error and run the line again. For this rebuild, PostgreSQL-backed stores still require the stopped-writer Doctor procedure in PostgreSQL updates and schema migrations. Later openclaw update runs use the rebuilt checkout's updater. The release the removed link named stays on disk (about 4.4 GiB under git-install/releases) and is no longer used. To free that space, remove that release directory, then run git worktree prune in the checkout. Updates that change no schema still go through the older updater; when its Gateway fails at startup (the web search case above), run them from a terminal with the checkout's openclaw, not from the Control UI. The check and the automatic recovery stay until there is evidence that no installed updater from that range still needs them; a published release does not replace the updater these checkouts run.

The inspection reports data at risk only on evidence: a schema that moved, or a store it cannot read after a new-version Doctor or boot check may have written it. When no new-version process has opened state yet, an unreadable store is a recorded warning (state-schema-verification), not data at risk, and the update continues or fails for its own recorded reason. A Git release trial switches back if the candidate fails to start. The Git release inspection does not require the new schema before that start. "Migration did not finish" applies only to installs whose updater runs Doctor before restarting. Installed updaters that run Git releases without this change (main builds since the release layout landed) fail every Git update that changes a schema in their own process, before the new release runs; rebuild the checkout once to get an updater with the fix.

The updater releases its shared-state readers before restarting the Gateway so the successor can migrate state/openclaw.sqlite in place under exclusive custody. It retires admissions after restart settles, including on failure, and reopens by path for plugin convergence, owed steps, and the final run record. History written before restart remains in that canonical database.

Earlier copy-and-swap targets could instead replace state/openclaw.sqlite, retaining openclaw.sqlite.pre-<buildId>. Installed updaters with the inspection fix above but without reader handoff reported post-update-failed ("SQLite database pathname changed while its worker owner is active") after such an upgrade even though the target was serving. If that historical first hop says the target is serving, the next plain openclaw update reports already-current and converges plugins. Updaters without the inspection fix still fail before the new release starts, as described above.

For shipped updaters that still rehearse databases, rehearsal avoids a second full backup of each private snapshot. Candidate inventory reads database registrations and the installed plugin index in one read-only transaction instead of copying the whole shared database just for metadata. Sources requiring private recovery keep the snapshot path. The candidate worker must contain this improvement; snapshot publication, integrity checks, and rollback verification are unchanged. Update schema inspection and rehearsal use SQLite online backup with a pinned read transaction, so a busy Gateway can keep writing while the copy includes committed WAL data. Each acquisition makes one copy instead of retrying until the database becomes quiet. On rollback-journal volumes, SQLite can delay writer commits until the consistent read finishes. Rehearsal records copied pages, bytes, and elapsed time in the update ledger, then checks and publishes the private copy with row IDs preserved for validation. Source databases and recovery backups retain their existing protection; the faster preparation takes effect when the newer updater runs.

Package updates also check npm availability for enabled configured plugins before stopping the serving Gateway or replacing the installed core. Registry targets are checked early; explicit package artifacts are checked using the privately staged package version before private validation, live-state preparation, or activation. The check uses the same plugin version rules as post-update synchronization, including release-cohort tracking, beta selection, and extended-stable targets. A missing plugin version or registry error produces a warning naming the affected plugin; the core update can continue. Registry-target --dry-run includes those warnings. For explicit artifacts, --dry-run does not stage the package and reports that plugin availability checking remains pending. Extended-stable does not accept --tag. Bundled and path-installed plugins do not require registry requests.

This metadata check does not reserve downloads. Plugin-only download, install, or load failures remain actionable warnings after an otherwise successful core update. Snapshot inventory runs from the staged candidate package, so it uses the target version's plugin inspector. Snapshot inventory and candidate Doctor share plugin source inspection. An unparseable entry produces a warning with the plugin ID, source path, and parser error while its files are copied unchanged and other entries are checked. Valid ESM plugins can use import.meta during dependency inspection. The updater preserves recorded choices and retains the previous plugin payload where possible. Follow the reported openclaw plugins update <id> command for a failed install or update, or openclaw doctor --fix for a load problem. Invalid configuration or state, ownership errors, and failed core startup or readiness checks still prevent completion.

Shell completion-cache refresh is best effort. If it times out and its process cleanup is verified, finalization records the failed cache phase and deadline warning while allowing the update to finish. Run openclaw completion --write-state to refresh it manually. Unverified process cleanup still blocks finalization; the updater does not report success while owned work may remain active.

npm plugin rollback

Updaters with plugin-cohort recovery keep the previous npm plugin artifacts, installation records, and matching settings until candidate activation is verified. If activation fails, rollback restores that cohort before restarting the previous Gateway. Backups precede plugin maintenance. After an interrupted update, openclaw update repair resumes the recorded plugin settlement under current ownership. It preserves later independent changes. When a plugin's install record, data/settings upgrade obligation, package files, source snapshot, or a config file the update wrote changed after the update, rollback keeps that later change, restores everything that still matches, and completes. It records the kept items in an update warning that repair prints and openclaw doctor shows. Recovery still stops for a config file whose path was replaced, for config that fails validation or secret resolution, and for a corrupt recovery journal. The updater performing the operation must contain this support; installing a newer candidate does not add it to an older parent. When recovery stays pending, the update prints the first failure below the unfinished-recovery refusal and names openclaw update repair when it can settle that plugin cohort. When a legacy Doctor fails or is interrupted, package rollback leaves compatible databases in place. Database restoration still requires the existing schema and write-generation checks; later independent changes prevent an unsafe restore.

Package-publication recovery

Supported POSIX npm updates print a recovery command using the selected external Node or Bun executable before transferring the staged package into recovery custody. Keep the printed commands; each names one operation with required --anchor and --operation arguments. The initial journal and helper are published together in a private control directory only after both are complete. A later update first prints a temporary staging command, then the stable command after the helper has moved. The staging command is valid only before that move; an earlier operation's command cannot select a later operation. The helper verifies its own recorded path, identity and content before using that journal. It is outside the live package and disposable recovery directory. status reads the operation, repair resumes only its recorded package publication, and retire removes only its recorded obsolete objects. These commands do not replace post-update plugin, migration or service recovery. Keep other package managers stopped while recovering the operation.

If an updater-owned recovery directory, helper, or journal gains group or other permissions, the updater restores owner-only access and warns with the path, observed mode, and link count. On Linux, this also clears the effective POSIX ACL mask; named ACL entries can remain but no longer grant access. When getfacl is available, the warning identifies detected ACL entries. Foreign ownership, symlinks, unexpected object types, multiply linked files, and permissions that cannot be repaired still require intervention. Repairing these private objects does not change package-content fingerprints or authorize recovery of modified package files. If recovery still refuses, automatic update and managed-service handoff reports retain its reason code and diagnostic message in the failed phase.

On FreeBSD, repair and retire read process identity through the recorded installation's own @openclaw/proc-safe dependency and its FreeBSD platform addon: the live package, or the copy the operation retains beside it during publication. Helpers written by older updaters cannot repair or retire on FreeBSD; status still reports the operation.

Bun recovery requires a supported Bun runtime with WAL-reset-safe SQLite and can run without Node installed. The installed updater controls the first upgrade: older releases may omit the recovery command on Bun or refuse a Bun recovery runtime. Installing a newer candidate does not change that first-hop behavior; subsequent updates use the candidate's recovery support.

Retirement records removal of the disposable directory before recording the helper's final unlink intent. The helper is then removed. The bounded last receipt remains in the control directory and is readable through openclaw update status --json as packageActivation, even after helper removal. A completed receipt is replaced only by a newly admitted update under current ownership; it is not authority to mutate an installation. Historical filesystem or executor-store identities do not have to match today's identities. Reboots, remounts, or removal of already-retained evidence do not reopen a closed operation. Reading a completed receipt does not rewrite it. A new update archives the completed receipt before preparing its own operation, preserving the journal and any leftover helpers or recovery directories as evidence.

Explicit repair preserves settled evidence, including the entire control journal, inside the operation's retained recovery directory. The completed journal leaves the active admission path, so an older updater does not need to understand a newer settlement reason. Ordinary successful retirement retains the last receipt until the next update archives it. Explicit repair verifies an installed candidate under current executor ownership, even when the old lease store disappeared or was replaced. It does not execute the old helper, so a changed or missing helper and changed retained directories are preserved as evidence rather than required as proof of the live package. An unfinished rollback still requires recovery while its package or published launchers remain installed.

If an external install replaced both recorded package generations and every published launcher, the next update retires the stale publication journal with a warning. It preserves the journal, helper, and retained package trees for diagnostics, including when the control directory or journal was copied. It does not restore or delete the current installation. Recorded generation inodes are excluded even across device-number changes, so a remount alone cannot qualify. The updater performing admission must contain this fix; an already-blocked older updater needs a manual package install first. Recovery runtime compatibility is checked before creating a publication journal.

openclaw update uses the same settlement before admission when the recorded lease database is missing or its identity has changed and the live installation is still the recorded previous or candidate package. Candidate content and launchers must pass verification. Settlement preserves recovery evidence, reports a warning, and does not restart the Gateway or install a package. --dry-run verifies and reports the planned settlement without changing the journal, lease database, or recovery evidence. The lease database stays at its existing location.

A publication that was still moving its files into the recovery directory, or had recorded its publish intent, cannot be settled without that lease database: nothing else proves that the original updater has exited. openclaw update, openclaw update repair, and the recorded recovery command all refuse with managed handoff lease database identity changed. Reinstall OpenClaw with the manual procedure, then run openclaw update: the reinstall replaces the recorded package, and the update retires the superseded operation as described above.

If a reboot or temporary-directory cleanup removes the lease database before publication starts, recovery can retire a prepared journal with no publication intent or published launchers. It first checks that the live package, launcher directory, and every launcher still have their recorded previous identities. Update admission, repair, and a separately staged recovery helper share this settlement. They warn and rename the journal, control directory, candidate, and the operation's remaining npm update stage into retained evidence; they do not delete them. Other stages are left with their owners. Changed identities, publication intent, or another phase do not qualify for this recovery path. Recovery status is read-only and can report an unfinished operation even when the lease database is missing or replaced.

The managed-update lease store still uses the shared per-user temporary location. Moving it to a state directory requires a coordinated migration: older updaters continue acquiring leases in the temporary location, and separate profiles can update the same installation. Copying the database would create competing lease owners; file symlinks and hard links do not satisfy the existing store contract. Durable placement remains follow-up work. These recovery changes must be present in the updater or separately staged helper that executes them; an older sealed helper does not gain the new behavior.

After the transaction verifies its selected installation, cleanup failures are warnings. Changed old package trees, old helpers, and unexpected backup contents are preserved, not restored or deleted. The updater durably closes their recovery operation and attempts to archive the evidence. If completed evidence cannot be archived, a later update retains it and uses the ordinary package-swap path without standalone publication recovery. Its warning names that limitation.

These rules do not mark an unverified publication as a successful update. Missing, legacy, corrupt, or still-applicable identity-mismatched unfinished recovery artifacts still require their recovery owner. Live ownership conflicts, changed selected packages or launchers, and pending restoration remain refusals. Preserve those artifacts; do not recreate the journal or remove them to bypass recovery.

These admission and cleanup fixes must be present in the updater executing them. A newer candidate cannot run before an already-blocked older updater downloads it. The candidate's dependency inventory can, however, avoid modifying old recovery artifacts during an update that has already passed admission.

Recover an unfinished publication after a remount

An older updater can reject an unfinished journal before downloading a fix when filesystem device numbers change after a reboot or remount. With a version containing this fix installed, run openclaw update repair from an independent terminal. Repair can settle prepared, publishing, publication-complete, and superseded operations when the journal's inodes still match under a consistent device-number mapping. Ordinary update admission stays strict, but an updater containing #201057's fix first applies the same verified settlement automatically, so the next openclaw update (or Control UI update) proceeds without a separate repair. Earlier updaters decline it and refuse with device number changed only; run openclaw update repair, then update again.

This settlement first shipped in 2026.10.5. Earlier releases, including the 2026.9 extended-stable line, refuse with Package publication journal does not match its installation and cannot settle the change themselves; starting with 2026.10.7, the message also names the changed bindings. From an earlier release, install 2026.10.5 or newer with the manual npm procedure, then run openclaw update repair --yes from the new installation. See #170031.

If the installed updater cannot read the journal, a separately installed OpenClaw version containing this fix provides the same settlement-only path:

bash
node /path/to/recovery-openclaw/dist/package-update-activation-recovery.mjs \  --anchor '/absolute/path/to/.openclaw.package-activation-<key>' \  --operation '<recorded-operation-id>' repair

Use the original anchor and operation ID with a supported external Node or Bun runtime. Keep other updaters and package managers stopped. Ordinary status and update admission remain strict for unfinished identity-mismatched journals.

On Homebrew Node installs, brew cleanup (which Homebrew also runs periodically after brew install and brew upgrade) removes dangling symlinks and empty directories below its prefix. That deletes the relative launcher copies retained in <anchor>/launchers and <anchor>/previous-launchers, leaving an anchor that holds only previous. Older updaters and helpers refuse that layout with ENOENT on <anchor>/launchers (#197910). Repair now settles it: settlement never republishes those copies, so an absent launcher root is accepted, while a present one must still match its recorded identity. The live launchers and all other checks below are still required.

If publication never started and the previous package is still installed, repair verifies its full tree fingerprint and unchanged launchers under the same device mapping, then settles the operation as publication-not-started. The candidate is retained as evidence; the installed package is unchanged. A previous package with unfinished publication intent or launcher receipts still requires its original recovery owner and is not silently archived.

For an already installed candidate, repair requires the staging path to be absent, consistent device-number changes with matching object inodes, the original intact helper and retained previous generation, a matching full candidate-tree fingerprint, valid package inventories and manifest, and unchanged launchers. Device projection applies only to digest verification: historical identities in the journal are not rewritten. Version or inode matches alone do not qualify; changed content, unsafe journal permissions or links, active update ownership, and unfinished rollback remain refusals.

Symlink launchers may have different recorded permission modes (for example, 0755 and 0700) if their targets and required identities still match. Regular-file launcher modes and package-tree integrity checks remain enforced.

If a manual installation has replaced the candidate with a newer version, repair verifies that installation's manifest, dist inventories, entry targets, and launchers before archiving the old operation as superseded-by-manual-install. Old package trees and helpers remain preserved as evidence; they do not have to pass the old candidate's fingerprint checks.

For the recorded candidate, under fresh executor ownership, repair records publication-settled-external-change and preserves the entire journal and recovery evidence in the reported archive. Removing that closed receipt from the active admission path lets the older updater continue without interpreting a new receipt kind. If archival fails while the active receipt remains, resolve the reported error and rerun the same command. If the helper reports an unconfirmed archive after moving the control directory, preserve and inspect the reported archive; the original command no longer has an active journal to reopen. The helper does not republish or roll back a package, delete retained generations, or restart or verify the Gateway. It does not execute the original helper. Other unfinished layouts still require their original recovery owner.

Recover a completed receipt with an older updater

An installed 2026.9.8 or 2026.9.9 updater can reject a completed anchor-retired receipt before downloading a fix when saved filesystem device numbers change. Use a separately installed OpenClaw version containing the completed-receipt recovery fix. Its standalone helper can archive completed history for the original installation while that installation's Gateway keeps running:

bash
node /path/to/recovery-openclaw/dist/package-update-activation-recovery.mjs \  --anchor '/absolute/path/to/.openclaw.package-activation-<key>' \  --operation '<recorded-operation-id>' statusnode /path/to/recovery-openclaw/dist/package-update-activation-recovery.mjs \  --anchor '/absolute/path/to/.openclaw.package-activation-<key>' \  --operation '<recorded-operation-id>' retire

Use the anchor and operation ID from the original journal, with a supported external Node or Bun runtime. Keep other updaters and package managers stopped. status must report complete; it does not modify the receipt. retire acquires fresh update ownership, verifies that the inspected completed receipt is still current, and moves its control directory into the printed .superseded-<id> archive. It preserves the journal bytes and saved identities, installed package, launchers, and application state. It does not run Doctor or plugin migrations. After successful archival, retry openclaw update using the original installation.

If archival fails and the active receipt remains, the command exits unsuccessfully and names the next step. Preserve both the receipt and any existing archive while resolving that error. An unfinished, foreign, or invalid operation still requires its original recovery owner; the independent helper cannot authorize publication or rollback for it. Do not rewrite identities or delete recovery artifacts.

Unfinished publication and rollback

openclaw update and openclaw update repair settle a leftover operation before they continue, so a killed publication no longer needs its printed recovery command. A killed update usually also leaves the plugin recovery it reserved, which is a separate check. The next openclaw update settles that as well when no operator is needed: on a package install, or a source checkout that still holds exactly the build the killed update installed, the killed update was a command-line openclaw update whose process has exited, and the update lease store still holds its lease. On Linux and macOS hosts, outside containers, a restart that cleared that store does not block it: the killed update recorded the boot it ran in, which shows its processes gone. It reports an interrupted-update-recovery warning. If the killed update had replaced the installed version without confirming it, had begun rolling back on it, or left the Gateway stopped, the update first finishes that version as openclaw update repair does (Doctor, plugin convergence, Gateway restart). That work is recorded on its own repair run, named by an interrupted-update-finalization warning. Then the update continues. A stopped Gateway is restarted only when the update would restart it anyway. When that Gateway is still stopped and the update runs with --no-restart, or when finishing fails, the update stops and names openclaw update repair. Otherwise it stops with Update <id> has unfinished recovery and, when repair can settle it, the reason and the command to run; see how a killed update is settled. Both commands settle a leftover publication:

  • Untouched preparation. It is retired after the original package and launchers are verified.
  • Interrupted before the candidate was installed. The publication was still moving its files into the recovery directory, or had recorded its publish intent, and the previous package is installed. The updater resumes it with the recovery that the printed command runs, which aborts it: the candidate returns to its own name, the operation is recorded as aborted, and its recovery directory is removed. The installed package and launchers are not touched.
  • Candidate installed. A prepared, publishing, or publication-complete operation is settled when the live candidate passes the same verification as repair, even when the update lease is unchanged. Its recovery evidence is retained.
  • No package installed. A publication without an atomic exchange was killed between its two moves. An update or repair that reaches admission for that installation publishes the recorded candidate into the gap and then verifies it as above. openclaw cannot start from that installation, so the printed recovery command is the usual way to finish this one.

Resuming needs proof that the original updater is gone. The updater claims the installation in the recorded update lease store, which succeeds only after the recorded updater and helper processes have exited. It resumes only a journal that its own build wrote, so the code that resumes is the code of the recorded recovery helper. An installed package is never replaced or changed by this step. When the update reaches target preparation, its result and run history record a package-publication-recovery warning that names the operation and what was done; before that it is printed. openclaw update repair records a settlement entry under the operation ID. A dry run previews the settlement without changing recovery artifacts, and cannot check that the original updater has exited.

The updater refuses, keeps the recovery artifacts, and reports the reason when:

  • Another updater or its helper still holds the installation. Wait for it, or run openclaw update repair once it has exited.
  • openclaw update repair already holds a reclaimed handoff or cancelled-update claim for the installation. Repair does not resume an interrupted publication under that claim; it reports the publication's recovery command.
  • The update lease store is missing or was replaced, for example after a reboot cleared the temporary directory, and the publication had started moving files but had not installed its candidate. The recovery command refuses too. Reinstall OpenClaw with the manual procedure, then run openclaw update, which retires the superseded operation.
  • The installed package, a launcher, or the recovery directory no longer matches what the journal recorded. The refusal names the mismatch; a reinstall with the manual procedure supersedes the operation.
  • A rollback is in progress, or candidate verification fails.
  • A different OpenClaw build wrote the journal. Use the reported recovery command, which runs that build's recovery helper.

After a managed-service update fails before stopping the original Gateway, the handoff checks whether that original version is still serving and records the outcome. A stopped Gateway or unavailable health check is reported with its reason. This observation does not restart the service or mark the attempted update successful.

To explicitly settle an external-helper operation stuck at prepared, publishing, or publication-complete whose live package already serves the candidate, run openclaw update repair from an independent terminal. Repair verifies the installed candidate's dist content inventory, manifest, launchers, and current update ownership before settling the operation. It archives the remaining helper and retained package evidence, including a changed previous tree, without restoring or deleting that tree. Failed verification leaves recovery armed and blocks the next update. Older updater versions without this settlement path still require their original recovery owner.

SQLite recovery and rollback custody verify file identity, size, and content. Timestamp-only changes are accepted after verifying identical bytes; replaced files or changed database or journal bytes still require recovery by their owner. Snapshot publication uses the same checks, including on older Linux kernels where reported file creation time changes after ordinary writes or hard-link removal.

For older in-directory activation journals, openclaw update status --json reports the recorded phase and the original helper's status command. The current updater only inspects these journals; use their original helper to recover or retire the operation before starting another update.

Package recovery does not replay a full-state checkpoint or reverse database migrations. Automatic rollback keeps compatible databases in place, preserving newer writes. If the previous runtime cannot read the current databases, the updater retains the candidate and recovery artifacts and reports why rollback was refused.

After migration, recovery checks the installed candidate's schemas before restarting a Gateway stopped by the update, even when normal Doctor completion did not need a process-settlement receipt. A later verification error does not make the previous package compatible with migrated state. Obsolete package backup cleanup is best effort: locked files or denied renames produce warnings with the retained path and filesystem cause, without failing verified activation.

Rollback snapshots settle local SQLite writers under maintenance ownership before capture, so writer shutdown during rollback is not mistaken for intervening writes. The installed updater owns snapshot capture; staging a newer candidate cannot change that behavior in an already-running older updater.

Switch channels or target a specific version:

bash
openclaw update --channel betaopenclaw update --channel extended-stableopenclaw update --channel devopenclaw update --dry-run   # preview without applying

openclaw update has no --verbose flag (the installer does). For diagnostics use --dry-run to preview planned actions, --json for structured results, or openclaw update status --json to inspect channel and availability state.

--channel beta selects the newest version by semantic version order from the beta and latest npm dist-tags. Use --tag beta for a one-off package update pinned to the raw npm beta dist-tag instead.

A saved update.channel remains the channel for future updates, automatic checks, and update status. For example, a one-off beta package on a saved stable channel keeps checking stable afterward. Use --channel beta to subscribe to beta updates. Plugins still follow the installed core version where required for compatibility.

--channel extended-stable is package-only, and installation remains foreground-only. OpenClaw reads the public npm extended-stable selector, verifies the selected exact package, and installs that exact version. Missing or inconsistent registry data stops the update; it never falls back to latest. If the selected version is older than the installed version, the normal downgrade confirmation still applies. The CLI persists the channel after a successful core update; a direct npm install -g openclaw@extended-stable --allow-scripts=openclaw does not update update.channel, but a final extended-stable package version still checks only the verified extended-stable selector for update availability. That direct command is for npm 12 or npm 11.16+. On npm 11.15 and earlier, omit --allow-scripts=openclaw. After the core swap, eligible official npm and trusted official ClawHub plugins with bare/default or latest intent converge to that exact core version. Eligible older OpenClaw release pins resume that default update policy. Explicit non-latest tags, independently versioned pins, third-party plugins, custom ClawHub registries, and other sources retain their existing behavior. Version-bound runtime plugins converge to the base release cohort when the core is a correction release (for example, YYYY.M.P-2 uses plugin YYYY.M.P). openclaw plugins update uses the same host-matching targets. Known-incompatible official runtime versions, such as Codex releases before 2026.9.7, are reported as unavailable before they can register or serve turns. Compatible versions remain loadable even when they are older than the host. Run openclaw update repair, or openclaw plugins update codex, then restart the Gateway. Newer explicit pins and independently versioned plugins retain their existing compatibility behavior. Catalog installs created by current OpenClaw versions retain that default intent. Verified OpenClaw-owned packages recorded at an exact OpenClaw release no newer than core resume their catalog's default selector after a successful update. This includes old automatic and manual pins. Their recorded registry and plugin settings are preserved, and subsequent updates continue following the selected channel. A version explicitly supplied to a plugin update command still applies to that operation.

--channel dev gives a persistent moving GitHub main checkout for npm-owned package installs and existing Git checkouts. Package installs reject the --tag main shorthand because the workspace checkout is not a self-contained package artifact. Use openclaw update --channel dev to switch to the supported checkout and build flow. Other explicit package specs keep their package-manager behavior. Dev target inspection fetches only the selected upstream source, respecting the repository's ref mappings and exclusions. It does not download unrelated branches or change the repository's shallow boundary. Stable and beta target inspection fetches release tags only, without refreshing remote branches. An implicit dev-channel switch from a detached release-tag checkout can use the fetched main commit even when the configured fetch refspecs only map tags. The updater leaves those mappings unchanged and still honors explicit branch exclusions. When it creates main, it records the selected remote and merge source so later dev updates remain managed. It does not take over an existing unmanaged main.

On source installs, Doctor and plugin updates keep plugins built with the host. A registry plugin with the same version string can target a different SDK, so it does not replace the source build without matching SDK build evidence. Existing registry generations remain on disk; convergence reports the bundled selection and skips their refresh. OPENCLAW_DEV_SOURCE_ROOT is not required.

Managed npm plugins on the beta channel use the same newest-of-beta/latest selection, including official plugins such as @openclaw/codex. An older beta tag cannot hold a plugin behind the current stable release. Startup repair leaves already-current packages in place so a no-op refresh does not require another restart.

See Release channels for channel semantics.

Updating from 2026.9.2 across a schema bump

Updates driven by OpenClaw 2026.9.2 can cross a shared-state schema bump normally. The target applies the migration content while retaining the old published schema version, so the old updater can finish its ledger writes and final report. Doctor explains that schema content is applied and version publication is deferred. The new Gateway runs on the migrated content during this interval.

Publication waits until every affected update run has been terminal for at least five minutes. A running row that has not changed for more than 30 minutes counts as abandoned for publication purposes only; this does not terminalize an identityless update-history row. The Gateway watcher publishes after the deadline; a later database open can also publish it. See the precise timing and residual old-CLI limitation in Database schemas.

When agent databases also need migration, the candidate first rehearses Doctor on private copies while the published updater can still roll back its package. After package commit, the fresh post-core process acquires current executor authority and delegates Doctor. Doctor verifies a retained recovery archive covering each agent database before migrating live state. The updater then restarts the Gateway.

Missing state metadata or unverified backup coverage can still produce update-schema-bump-unfenced with database versions and recovery instructions. If npm postinstall emits this typed refusal, the updater reports it without retrying the install with optional dependencies omitted. Other install failures retain their existing retry behavior. Before package commit, let the failed update finish restoring the previous package. OpenClaw 2026.9.2 leaves the Gateway service stopped after failed post-install verification. After package commit, the old package backup is gone: finish openclaw doctor --fix with the installed compatible build, then run openclaw gateway start. Package rollback cannot undo migrated state.

If the compatible package still needs installation, follow the manual update procedure from a shell outside the Gateway, using the exact target version from the refusal instead of latest.

Same-schema updates, earlier ledger-less updaters such as 2026.9.1, and fenced transactional updaters from 2026.9.3 onward keep their existing behavior. The fallback does not undo an earlier migration; if the database is already newer than the restored package, install a compatible target and finish Doctor before starting the Gateway.

For a Git checkout updated by 2026.9.2, a Doctor refusal before state writes prints source recovery commands when the checkout's reflog identifies the previous commit unambiguously. Wait for the updater to exit, then follow the printed checkout, pnpm install, pnpm build, and service-start guidance from an independent shell. If the previous commit cannot be verified, Doctor points you to the reflog instead. A refusal after state repairs keeps the migration owner's instructions: restoring source alone does not restore state. These diagnostics also enter the warning log, subject to normal logging settings and rotation. After resolving the refusal cause, retry the update. Once the upgrade succeeds, subsequent updates check the new version before activation.

From chat

In the Control UI, expand Update available in the Inbox to check the latest Dev Git target. The card checks again before opening update confirmation. While checking, it hides the previous SHA and disables the update action. A failed check shows an error; retry the action to check again. Opening the card does not start an update.

Update confirmation belongs to the Gateway and profile that opened it. Switching Gateways or profiles retires the pending confirmation; open it again on the intended Gateway. Native updates also check current administrator access when you confirm and show an access error if it was revoked. Once an update starts, its progress report remains available through that Gateway's restart. The dialog shows "Starting update…" until the progress report arrives and "Reconnecting…" during a temporary disconnect.

After reconnecting, Settings → Updates reads the saved result and releases checks started by the previous connection. Administrators can close the completed report and change update settings or start another update.

Ask the agent to update OpenClaw, or send /update from Discord or another connected chat. For natural-language owner requests on standard installations, the agent uses the built-in updater through the gateway tool’s update.run action. If the running Gateway is served directly from a Git checkout, the agent can use the host’s documented in-place procedure without an exact revision, but only if the host independently authorizes maintenance for that caller. Otherwise, Git on a source install still requires an explicitly requested exact revision and host maintenance authorization. If the agent can’t identify the serving installation or confirm an authorized procedure, it reports the blocker instead of guessing. A request to update does not by itself authorize switching installation methods.

The gateway tool also exposes restart for a runtime-coordinated safe restart and update.cleanup for explicit recovery cleanup without stopping the Gateway. The minimal, coding, and messaging profiles expose these maintenance actions without granting configuration reads. Explicit tool restrictions still apply.

On an explicit owner request, the agent performs the supported, authorized action itself when available. Restart requests can be deferred until active work settles; an accepted schedule is not a completed restart. Cleanup uses the serving Gateway's owner-bound worker and the existing manual verification, eligibility, and dependency checks. It permanently removes eligible rollback copies, so it requires a cleanup request. Set dryRun: true to preview. It does not select unmanifested paths or stop/restart the Gateway.

Operator-created scheduled automations can also call gateway → update.run without a chat owner identity. The Gateway uses the active scheduled run's authority; a notification destination does not become its requester. Jobs created by external chat users and webhook turns do not gain this authority. External chat update requests still require current command-owner authority.

/update is the model-independent fallback: it works without a functioning model or access to the gateway tool. The tool’s update.run action, the slash command, and the Control UI all use the same built-in update handler and current authorization checks; they don’t choose a host-specific procedure.

The new version is checked while the old Gateway serves. An already-current update restarts a running Gateway when plugins change or its service points at a different installation. Update runs can send these notices in that chat as the Gateway observes the recorded milestones:

  1. An acknowledgement when the update is accepted.
  2. ⏳ Preparing to restart OpenClaw… The update is not complete yet. before the managed Gateway stops.
  3. 🔁 Checking that OpenClaw is ready… during Gateway verification.
  4. The final report, including successful updates.

External update and restart notices go to destinations listed in commands.ownerAllowFrom or a linked administrator's direct conversation. The channel resolves a direct recipient to its stable sender identity before checking the administrator link; group and channel targets do not inherit a person's administrator authority. Selecting a non-owner chat in the Control UI does not authorize notices to that contact. If no owner destination resolves, OpenClaw logs the skipped notice and keeps the update outcome in the run record and Control UI; it does not redirect the notice to another chat or wake the rejected session with diagnostics.

Update lifecycle notices also honor the destination account's actions.sendMessage policy. An explicit account setting overrides the channel default; when neither sets the flag, notices are allowed. Disabled sends are recorded as skipped notices without preventing the update or its Control UI report.

Managed systemd or launchd updates can stop the Gateway before an intermediate notice is delivered. The complete four-message sequence is not guaranteed for those installations; the durable run report remains available after reconnect.

For updates requested from a Control UI or desktop conversation, the app shows progress and the result in a persistent top-right notification instead of appending update messages to the conversation. The notification reconnects to the existing run after a Gateway restart. Dismiss the result or open Settings → Updates for the full report. Native mobile and other chat clients keep their current delivery.

Other runs with an internal origin session receive these notices in that session’s transcript. Passing only sessionKey is enough; the caller does not need to supply deliveryContext. Before stopping the managed service, the updater waits for the serving Gateway to finish its restart notice attempt. That wait is capped at 10 seconds so a stalled notice cannot block activation.

The report includes the outcome, recorded phase durations, failed steps, verification facts, and the next action when needed. Failed-step summaries preserve the initiating cause ahead of trailing recovery advice, using recorded failure facts when available. Local run history retains verification findings and backup recovery paths separately from the excerpt. A run sends each notice at most once; an update that stops before restart sends only the notices for phases it reached. Restart recovery reuses an already-recorded completion notice even if later verification changes the outcome. The run report remains the current source for that outcome. A milestone with no eligible delivery target is recorded as skipped instead of retried on every recovery check.

If the update cannot start, the bot records and explains why and provides the manual command when available. A missing owner permission requires owner setup, and an externally supervised installation uses its deployment owner's update workflow.

For installations updated by OpenClaw itself, chat, CLI, Control UI, and automatic updates share a durable run ID. Use openclaw update status to read the active or latest report, including after a restart; --json exposes the activeRun and lastRun records. See Run history and reports for Gateway history queries.

The sender must be in commands.ownerAllowFrom or have a verified channel link to a current Gateway administrator. Being allowed to chat does not grant owner permissions. If your account is not an owner, the reply explains how the Gateway operator can connect it. Channel setup and pairing distinguish owner access from chat access; existing allowed users are not automatically promoted. Chat updates retain the original authorization source across managed handoffs, repair workers, and Doctor runs. Each worker checks the original installation's current policy and profile state before acting. A repair worker's inference turn checks them before each model attempt, each tool call and its effects, and before it reports a result; its run-preparation checks verify update ownership, the updater connection, and cancellation. Reassigning a channel account to another administrator does not transfer an update already in progress; a current owner must start a new update. Older updater handoffs without a captured profile source retain their configured-owner checks and cannot acquire linked-profile authority during recovery. External-chat updates through /update or the tool require commands.restart (enabled by default), including managed installations. The slash command also follows command-access restrictions; tool calls follow tool policy. Chat updates use the hosting installation's configured update channel and install method. The runtime retains restart ownership before stopping the Gateway. Non-owner requests remain refused, and chat restarts honor commands.restart just like chat updates. Cleanup does not depend on that flag because it does not restart the Gateway.

Inspect FreeBSD service discovery

The standalone scripts/freebsd-service-inspect.mjs diagnostic reports which openclaw rc.d definitions the native configuration selects. It requires a root-owned Node installation, script, and shared discovery helper. It does not require the OpenClaw Ports service package.

From an existing root shell, install the script from a trusted OpenClaw package:

sh
install -d -o root -g wheel -m 0755 /usr/local/libexec/libinstall -o root -g wheel -m 0644 /path/to/openclaw/scripts/freebsd-service-inspect.mjs /usr/local/libexec/openclaw-service-inspect.mjsinstall -o root -g wheel -m 0644 /path/to/openclaw/scripts/lib/freebsd-service-discovery.mjs /usr/local/libexec/lib/freebsd-service-discovery.mjs(cd / && /usr/bin/env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin LC_ALL=C /usr/local/bin/node /usr/local/libexec/openclaw-service-inspect.mjs)

Use your root-owned Node path if it differs. Clear the environment before Node starts, as shown, to exclude Node preload options. The command accepts no arguments. It reads native administrator shell configuration as root and requests no service lifecycle operation. Administrator configuration is trusted shell code, not a sandboxed data format.

The result includes the exact clean environment and working directory used for discovery. It corresponds to service invoked with that same context. Configuration that depends on another environment or directory can select different services.

The single JSON result reports absent, present, or unknown. Present results include executable and non-executable definitions, their native search order, and the first executable definition. Symlinks, unsafe ownership, incomplete inspection, or unexpected configuration output produce unknown and exit 1. Configuration contents and subprocess errors are not included in the result.

This is a diagnostic observation. It does not establish process or package ownership, authorize an update, or enable CLI-managed rc.d service updates. Continue to use the installation owner's update procedure above.

Stale update history

Untouched, identityless legacy admissions older than 24 hours can expire automatically during Gateway startup or a status check. The row is retained as failed with reason legacy-driver-expired and retry advice; no explicit repair is needed for that shape.

If update status stays in progress while the Gateway is healthy, check that no update is still running. On the updated installation, run:

bash
openclaw update repairopenclaw update status

Standalone repair reports the repairing phase while Doctor and plugin maintenance run. Its finalize:* history steps identify the current operation. Before maintenance, repair marks confirmed dead drivers as abandoned while preserving their history. Completing maintenance is acknowledged separately, so a later repair failure does not leave those exited drivers recorded as running. Runs with retained recovery custody stay with their recovery owner.

For an inactive legacy row older than 30 minutes, repair verifies that the running Gateway matches the installed version and build, then clears the stale run without maintenance or a service restart. A new explicit openclaw update can also supersede a single stale identityless row. Recent rows and recorded live drivers are protected. Identityless rows outside the legacy-expiry shape require explicit recovery; the Control UI's configuration-write suspension clears after reconciliation.

Repair started within the owning update can continue with a matching inherited run ID and live process identity; the run records that continuation. Repair still refuses an unrelated live or stalled updater. The error identifies its run, phase, driver PID, host, start and last-activity ages, and observed liveness. Wait for that update to finish, or stop the named driver on its host and rerun repair after it exits. See Update repair for maintenance and recovery behavior.

An empty update history does not mean the installation is free. If openclaw update reports that another update executor owns the installation and names cancelled update custody, an earlier cancelled updater exited without releasing it. Run openclaw update repair; it settles that custody once the updater and its descendants are proven gone, and otherwise reports the blocker, exits with code 2, and leaves the next update blocked. See Update repair.

OpenClaw 2026.9.2 does not reject a new CLI update because an older running row exists: its admission path creates a new run, and its ledger checks only for a duplicate run ID. Upgrade normally, then use the updated openclaw update repair if the old history remains. A package-manager escape is not required for this ledger defect. See Update run history.

Retire update recovery data

Once you have verified the update and your conversations, ask the agent to clean up update recovery copies. The gateway tool's update.cleanup action runs under the serving Gateway's ownership; no stop is needed. It also accepts dryRun: true for a preview. The standalone CLI keeps its offline apply requirement below.

To preview retained migration originals from a terminal:

bash
openclaw update cleanup --dry-run

Use the same profile and state/config overrides as the update, and check the state directory printed in the report. The metadata-only preview can run while the Gateway is active. To apply, stop that Gateway yourself, wait for other SQLite maintenance to finish, and stop database readers such as session-listing watchers. Keep them stopped until openclaw update cleanup exits; read-only connections can change WAL/SHM sidecars and invalidate verification. Cleanup never stops or restarts the Gateway. Confirmation defaults to No; automation must explicitly pass --yes, including when using --json.

Cleanup permanently gives up rollback to eligible originals, including repaired branches and old provider metadata. Current SQLite history, operator backups, and protected or unknown artifacts remain. It is not a substitute for a pre-update backup. See Update cleanup for eligibility, JSON output, and resuming interrupted deletion. Private package, command-shim, and Git runtime backups remain owned by the update transaction and are outside this migration cleanup. Their pre-migration database snapshot directories are retired once a later update is verified successful. An interrupted entry in update history does not block cleanup of otherwise eligible migration archives.

After updating

Successful managed openclaw update runs already restart and verify the Gateway. Use these steps after a manual installation or when checking a reported problem.

Run doctor

bash
openclaw doctor

Migrates config, audits DM policies, and checks gateway health. Doctor also compares active official plugins with the OpenClaw package the managed service will load after restart. Resolve any plugin restart-readiness warning before continuing. Details: Doctor

Standalone repair allows up to twenty minutes for its pre-repair original-state capture. If that capture times out, Doctor waits for its workers to settle and reports a warning with backup and retry instructions; repair-specific migration backups still apply. Doctor restores a managed Gateway it stopped, including after SIGINT, SIGTERM, or SIGHUP interrupts repair. If restoration fails, it prints the failure and the command to start the Gateway after resolving it.

On startup, the Gateway can confirm an unfinished plugin data/settings upgrade when every plugin migration phase reports no remaining work and its settings validate. It does not run offline repairs. A remaining migration stays pending with its phase named in the Gateway log. An explicit state-migration obligation also stays pending if the installed plugin no longer supplies its detector. Doctor settles an unused or disabled unavailable plugin's pending upgrade when there are no retained settings to migrate, even if an earlier update recorded a required migration. It keeps existing plugin state and defers required migration or inspection until the plugin is active. Installing or enabling that plugin does not bypass its migration: runtime admission holds it until Doctor migrates the state or confirms it is already ready. This deferral clears the inactive plugin's repair warning without claiming its state was migrated. For an installed inactive plugin with retained settings, Doctor can inspect both migration phases without enabling the plugin or registering its runtime or tools. If its detectors confirm no remaining work and the retained settings validate, Doctor completes the obligation with a warning and keeps those settings, including config.enabled: false. Detected source data, failed inspection, or settings that still need repair keep the obligation pending. Missing migration owners still require the install or enable step named by Doctor. For a systemd system unit, Doctor checks stop permission before draining the Gateway; an unprivileged run names the sudo systemctl stop <unit> command for the service owner. Run Doctor as the state-owning account after that stop, then have the service owner start the unit.

On Linux, openclaw doctor --fix can reclaim abandoned updater runtimes even after a systemd user-manager re-exec. The manager's --deserialize argument and its protected (sd-pam) child do not count as runtime holders. Actual runtime references and unverified same-account processes still preserve the affected artifacts. An unreadable service-marker environment from a known foreign account, including root, does not block cleanup without positive OpenClaw or runtime-path evidence. Unknown process ownership stays conservative. The Doctor performing cleanup must contain this fix; it can reclaim runtimes left by older updaters without changing their markers or requiring privileged process inspection.

Running node hosts (openclaw node run, including the CLI process their launcher starts), the macOS app, and its node worker never create updater runtimes, so they do not block reclamation on any platform unless they reference a runtime. On macOS, helpers that inherit the Gateway's service environment, such as credential agents or adb, are not OpenClaw processes. A CLI process whose title hides its command still preserves runtimes unless its launcher shows a command that never updates.

On Windows, the same reclamation reads native process command lines and working directories. Processes owned by another account and protected system processes do not hold runtimes, matching unreadable foreign processes on macOS. A process of the same account whose command line is hidden still preserves runtimes when its image is Node.js, Bun, or OpenClaw, and Doctor names its PID.

On Windows, openclaw doctor --fix can also retry abandoned backup scratch cleanup after an older release reported EPERM while renaming to an openclaw-backup-retired-* directory. Active backup scratch and published archives remain protected. See Backup scratch cleanup.

If you use the unpacked Chrome extension, also run openclaw browser doctor --browser-profile chrome. For a version-mismatch warning, reload the extension from chrome://extensions; fully restart Chrome if the warning remains.

Restart the gateway

bash
openclaw gateway restart

Verify

bash
openclaw health

Background exec notifications after an update

Background-command completions can trigger follow-up turns in their originating session even when recurring automations are disabled. To keep background exec without these extra model calls, set tools.exec.notifyOnExit: false and check per-agent overrides at agents.entries.<id>.tools.exec.notifyOnExit. Use process poll to collect results. See Background exec notifications for when the setting takes effect.

Detailed topics

Was this useful?