You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@ Docs: https://docs.openclaw.ai
53
53
- Plugins/runtime-deps: recover interrupted bundled runtime-dependency installs whose package sentinels exist but generated materialization is incomplete, forcing npm/pnpm repair in Gateway startup, doctor, and lazy plugin loads instead of leaving channels crash-looping on missing packages. Fixes #75309; refs #75310, #75296, and #75304. Thanks @scottgl9.
54
54
- Plugins/runtime-deps: treat no-main and export-map package sentinels without reachable entry files as incomplete, so Gateway startup, doctor, and lazy plugin loads repair interrupted bundled dependency installs instead of accepting package.json-only partial installs. Fixes #75309; refs #75183. Thanks @shakkernerd.
55
55
- Plugins/runtime-deps: keep runtime inspection and channel maintenance commands from downloading bundled plugin dependencies, route explicit repairs through `openclaw plugins deps --repair`, and still allow Gateway/DO paths to repair missing deps before import. Refs #75069. Thanks @xiaohuaxi.
56
+
- Updates: force non-deferred update restarts after package-manager updates requested through the live Gateway control plane and fail release validation on post-swap stale chunk import crashes, so Telegram/Discord imports do not stay pointed at removed dist files. Fixes #75206. Thanks @xonaman and @faux123.
56
57
- Agents/tool-result guard: use the resolved runtime context token budget for non-context-engine tool-result overflow checks, so long tool-heavy sessions no longer compact early when `contextTokens` is larger than native `contextWindow`. Fixes #74917. Thanks @kAIborg24.
57
58
- Gateway/systemd: exit with sysexits 78 for supervised lock and `EADDRINUSE` conflicts so `RestartPreventExitStatus=78` stops `Restart=always` restart loops instead of repeatedly reloading plugins against an occupied port. Fixes #75115. Thanks @yhyatt.
58
59
- Agents/runtime: skip blank visible user prompts at the embedded-runner boundary before provider submission while still allowing internal runtime-only turns and media-only prompts, so Telegram/group sessions no longer leak raw empty-input provider errors when replay history exists. Fixes #74137. Thanks @yelog, @Gracker, and @nhaener.
Copy file name to clipboardExpand all lines: docs/cli/update.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,11 @@ install method aligned:
82
82
-`beta` → prefers npm dist-tag `beta`, but falls back to `latest` when beta is
83
83
missing or older than the current stable release.
84
84
85
-
The Gateway core auto-updater (when enabled via config) reuses this same update path.
85
+
The Gateway core auto-updater (when enabled via config) launches the CLI update path
86
+
outside the live Gateway request handler. Control-plane `update.run` package-manager
87
+
updates force a non-deferred update restart after the package swap, because the old
88
+
Gateway process may still have in-memory chunks that point at files removed by the
89
+
new package.
86
90
87
91
For package-manager installs, `openclaw update` resolves the target package
88
92
version before invoking the package manager. npm global installs use a staged
@@ -151,7 +155,7 @@ If an exact pinned npm plugin update resolves to an artifact whose integrity dif
151
155
<Note>
152
156
Post-update plugin sync failures fail the update result and stop restart follow-up work. Fix the plugin install or update error, then rerun `openclaw update`.
153
157
154
-
When the updated Gateway starts, enabled bundled plugin runtime dependencies are staged before plugin activation. Update-triggered restarts drain any active runtime-dependency staging before closing the Gateway, so service-manager restarts do not interrupt an in-flight npm install.
158
+
When the updated Gateway starts, enabled bundled plugin runtime dependencies are staged before plugin activation. Package-manager `update.run`restarts bypass the normal idle deferral after the package tree has been swapped, so the old process cannot keep lazy-loading removed chunks. Service-manager restarts still drain runtime-dependency staging before closing the Gateway.
155
159
156
160
If pnpm bootstrap still fails, the updater stops early with a package-manager-specific error instead of trying `npm run build` inside the checkout.
Copy file name to clipboardExpand all lines: docs/gateway/protocol.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -378,7 +378,7 @@ enumeration of `src/gateway/server-methods/*.ts`.
378
378
- `config.apply` validates + replaces the full config payload.
379
379
- `config.schema` returns the live config schema payload used by Control UI and CLI tooling: schema, `uiHints`, version, and generation metadata, including plugin + channel schema metadata when the runtime can load it. The schema includes field `title` / `description` metadata derived from the same labels and help text used by the UI, including nested object, wildcard, array-item, and `anyOf` / `oneOf` / `allOf` composition branches when matching field documentation exists.
380
380
- `config.schema.lookup` returns a path-scoped lookup payload for one config path: normalized path, a shallow schema node, matched hint + `hintPath`, and immediate child summaries for UI/CLI drill-down. Lookup schema nodes keep the user-facing docs and common validation fields (`title`, `description`, `type`, `enum`, `const`, `format`, `pattern`, numeric/string/array/object bounds, and flags like `additionalProperties`, `deprecated`, `readOnly`, `writeOnly`). Child summaries expose `key`, normalized `path`, `type`, `required`, `hasChildren`, plus the matched `hint` / `hintPath`.
381
-
- `update.run` runs the gateway update flow and schedules a restart only when the update itself succeeded.
381
+
- `update.run` runs the gateway update flow and schedules a restart only when the update itself succeeded. Package-manager updates force a non-deferred update restart after the package swap so the old Gateway process does not keep lazy-loading from a replaced `dist` tree.
382
382
- `update.status` returns the latest cached update restart sentinel, including the post-restart running version when available.
383
383
- `wizard.start`, `wizard.next`, `wizard.status`, and `wizard.cancel` expose the onboarding wizard over WS RPC.
Copy file name to clipboardExpand all lines: docs/install/updating.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,6 +168,13 @@ The auto-updater is off by default. Enable it in `~/.openclaw/openclaw.json`:
168
168
The gateway also logs an update hint on startup (disable with `update.checkOnStart: false`).
169
169
For downgrade or incident recovery, set `OPENCLAW_NO_AUTO_UPDATE=1` in the gateway environment to block automatic applies even when `update.auto.enabled` is configured. Startup update hints can still run unless `update.checkOnStart` is also disabled.
170
170
171
+
Package-manager updates requested through the live Gateway control-plane handler
172
+
force a non-deferred update restart after the package swap. That avoids leaving
173
+
an old in-memory process around long enough to lazy-load chunks from a package
174
+
tree that has already been replaced. Shell `openclaw update` remains the
175
+
preferred path for supervised installs because it can stop and restart the
objective: Verify an agent can self-update an installed OpenClaw package from 2026.4.26 to latest by using the gateway update.run action, then recover through the forced restart.
14
+
successCriteria:
15
+
- The agent is explicitly instructed to use the gateway tool action update.run instead of shell package-manager commands.
16
+
- The update request carries a restart note marker that can be observed after the gateway restart.
17
+
- Gateway and qa-channel return healthy after update.run restarts the process.
18
+
docsRefs:
19
+
- docs/cli/update.md
20
+
- docs/install/updating.md
21
+
- docs/gateway/protocol.md
22
+
codeRefs:
23
+
- src/agents/tools/gateway-tool.ts
24
+
- src/gateway/server-methods/update.ts
25
+
- src/infra/restart.ts
26
+
execution:
27
+
kind: flow
28
+
summary: "Opt-in destructive package-update lane: ask the agent to update a 2026.4.26 install to latest via gateway action update.run and verify the restart marker after recovery."
29
+
config:
30
+
requiredProviderMode: live-frontier
31
+
sourceVersion: "2026.4.26"
32
+
targetTag: latest
33
+
allowEnv: OPENCLAW_QA_ALLOW_UPDATE_RUN_SELF
34
+
channelId: qa-room
35
+
```
36
+
37
+
```yaml qa-flow
38
+
steps:
39
+
- name: asks the agent to self-update through update.run
`Update-run self-upgrade QA check. The OpenClaw package under test was installed from openclaw@${config.sourceVersion} and must update itself to openclaw@${config.targetTag}. Use the gateway tool with action=update.run. Do not run npm, pnpm, bun, git pull, or shell package-manager commands yourself. Set note exactly to "${marker} update.run complete" and restartDelayMs to 0 so the post-restart channel message proves recovery.`
88
+
timeoutMs:
89
+
expr: liveTurnTimeoutMs(env, 180000)
90
+
- call: waitForGatewayHealthy
91
+
args:
92
+
- ref: env
93
+
- 180000
94
+
- call: waitForQaChannelReady
95
+
args:
96
+
- ref: env
97
+
- 180000
98
+
- call: waitForOutboundMessage
99
+
saveAs: outbound
100
+
args:
101
+
- ref: state
102
+
- lambda:
103
+
params: [candidate]
104
+
expr: "candidate.text.includes(marker)"
105
+
- expr: liveTurnTimeoutMs(env, 180000)
106
+
- sinceIndex:
107
+
ref: startIndex
108
+
- call: env.gateway.call
109
+
saveAs: updateStatus
110
+
args:
111
+
- update.status
112
+
- {}
113
+
- timeoutMs: 30000
114
+
- assert:
115
+
expr: "Boolean(updateStatus?.sentinel)"
116
+
message:
117
+
expr: "`update.status did not report a restart sentinel after update.run: ${JSON.stringify(updateStatus)}`"
118
+
detailsExpr: "env.gateway.runtimeEnv[config.allowEnv] !== '1' ? `skipped destructive package self-update; set ${config.allowEnv}=1 to run` : `runId=${started.runId} marker=${marker} outbound=${outbound.text}`"
0 commit comments