Repository navigation
Description
Summary
Attempting to upgrade an active openclaw 2026.4.29 installation to 2026.5.2 fails for any user whose openclaw.json references plugins that 5.2 has externalized to separate npm packages (in our case: brave, discord, voice-call). The failure is multi-stage and the recovery path has its own blockers, leaving the gateway in a state that cannot self-recover and cannot be downgraded cleanly.
This isn't about any single externalized plugin breaking — it's that the upgrade path itself does not work end-to-end for the documented "common" case.
We worked around it manually (npm install -g @openclaw/... then cp -r into ~/.openclaw/npm/node_modules/), but that's not a procedure most users will figure out, and it leaves the install in a state that future openclaw plugins update will likely fight with.
Setup
- Linode VPS, Singapore region
- Pre-upgrade: openclaw 2026.4.29 (a448042), bundled
brave,discord,voice-callworking openclaw.jsonreferences those plugins viaplugins.entries.*,plugins.allow, andtools.web.search.provider: "brave"- ChatGPT OAuth via
openai-codex/gpt-5.5, no OpenAI API key
What broke
1. Brave plugin npm package name doesn't follow the convention
The other externalized plugins follow @openclaw/<plugin-id> (@openclaw/discord, @openclaw/voice-call, @openclaw/codex, @openclaw/whatsapp). Brave is the odd one out: it's published as @openclaw/brave-plugin. The README under "Plugin externalization" doesn't call this out. We spent ~30 minutes verifying this wasn't a publish-lag issue (every other variant — @openclaw/brave, openclaw-brave, openclaw-plugin-brave — returns 404).
Suggestion: rename to @openclaw/brave (consistent), or document the suffix prominently in the externalization release notes.
2. npm install -g @openclaw/<plugin> installs to the wrong location
Running npm install -g @openclaw/brave-plugin@2026.5.2 puts the package at /home/ubuntu/.npm-global/lib/node_modules/@openclaw/brave-plugin/ — which is the standard global npm location.
Openclaw 5.2 instead looks for externalized plugins at /home/ubuntu/.openclaw/npm/node_modules/@openclaw/<plugin>/. The installs.json records this path:
"brave": {
"source": "npm",
"spec": "@openclaw/brave-plugin",
"installPath": "/home/ubuntu/.openclaw/npm/node_modules/@openclaw/brave-plugin",
"version": "2026.5.2"
}So npm install -g registers the package as installed (it shows up via npm ls -g) but openclaw cannot find it. The user gets:
Config invalid
File: ~/.openclaw/openclaw.json
Problem:
- tools.web.search.provider: web_search provider is not available: brave
(install or enable plugin "brave", then run openclaw doctor --fix)
Suggestion: either (a) recognize npm-global locations as a valid plugin source, or (b) document ~/.openclaw/npm/ as the only correct install location and provide a CLI helper that does the install correctly without needing to npm install -g first.
3. openclaw plugins install is unreachable when the gateway can't boot
This is a chicken-and-egg loop:
- Gateway can't boot because config validation fails (plugin missing)
openclaw plugins install @openclaw/brave-pluginrequires the gateway to be reachable to register the install- Without the install, gateway can't boot
- Loop forever
Even from the CLI on a stopped gateway, openclaw plugins install errors out with the same config-invalid message before reaching the install logic:
$ openclaw plugins install @openclaw/brave-plugin
... (config warnings) ...
Config invalid
File: ~/.openclaw/openclaw.json
Problem:
- tools.web.search.provider: ...
Run: openclaw doctor --fix
Suggestion: openclaw plugins install should be runnable in a config-bypass mode for exactly this recovery scenario. Or the install should be possible from the CLI without requiring config validation to pass.
4. openclaw doctor --fix plugin auto-install never runs in this state
The 2026.5.2 release notes promise that doctor will repair missing externalized plugin installs:
"install actively used downloadable OpenClaw plugins through the configured external source"
In practice, the migration is gated on meta.lastTouchedVersion and runs as part of the gateway boot sequence. When the gateway can't boot (because of step 3), the migration never executes. We verified this by running openclaw doctor --fix --non-interactive — it errors out with the same config-invalid message before reaching the plugin-install repair step.
Suggestion: extract the plugin-install repair into a standalone command (e.g. openclaw plugins repair-installs) that runs without gateway/config dependencies.
5. Downgrade is blocked by meta.lastTouchedVersion
After the failed upgrade, downgrading to 4.29 (npm install -g openclaw@2026.4.29) gets:
Config was last written by a newer OpenClaw (2026.5.2); current version is 2026.4.29.
Refusing to start the gateway service because this OpenClaw binary (2026.4.29) is
older than the config last written by OpenClaw 2026.5.2.
Run the newer openclaw binary on PATH, or reinstall the intended gateway service from the newer install.
Set OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 only for an intentional downgrade or recovery action.
The protection is reasonable but the failure mode is harsh: a user who hits the upgrade chain in steps 1-4 above and tries to recover by downgrading discovers they need to either (a) set an undocumented env var with a scary name, or (b) manually edit meta.lastTouchedVersion in the config back to the older version (which is what we ended up doing).
Suggestion: when OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS is required for a downgrade-after-failed-upgrade scenario, the error message should mention that the safe alternative is to revert meta.lastTouchedVersion in the config, with the exact key path and value to restore.
What we did to recover
npm install -g openclaw@2026.5.2(succeeded; binary in place)openclaw update --yes— failed at doctor step (steps 3, 4 above)npm install -g @openclaw/brave-plugin@2026.5.2 @openclaw/discord@2026.5.2 @openclaw/voice-call@2026.5.2— installed packages but in wrong location (step 2)cp -r /home/ubuntu/.npm-global/lib/node_modules/@openclaw/brave-plugin /home/ubuntu/.openclaw/npm/node_modules/@openclaw/(and same for discord, voice-call) — manual workaround for step 2systemctl --user restart openclaw-gateway.service— gateway came up, plugins now registered asenabled=True, status=loaded, version=2026.5.2- After hitting a separate Telegram-polling regression (5.2 telegram polling never starts on high-RTT hosts (regression vs 4.29) #76388), we downgraded back to 4.29 — hit step 5, had to edit
meta.lastTouchedVersionmanually to recover
Why this matters
The 5.2 release notes pitch external plugins as the path forward, and the changelog explicitly enumerates plugins prepared for npm publishing. But for any existing installation that uses those plugins (which is the vast majority — discord, voice-call, brave, whatsapp, codex are all in the externalized set), the upgrade path described in the changelog does not work without the manual workarounds above. Most users will get stuck after step 2 and either downgrade (and hit step 5) or open a support thread.
Environment
- openclaw: 2026.5.2 (a448042, npm
latest) - previous: 2026.4.29 (a448042)
- OS: Linux (Linode VPS, Singapore region)
- Node: bundled with openclaw (v22.22.0)
- Externalized plugins user references in config:
brave,discord,voice-call
Happy to provide stability bundle, full prep-stage trace, or the exact installs.json contents for the broken state.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 3, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve.
Summary
Keep open. Current main has partial fixes for the 5.2 plugin externalization fallout, but source inspection still shows a live upgrade recovery gap: update-time doctor defers configured plugin installs, post-core plugin sync skips invalid configs, and
plugins installremains blocked for the Brave invalid-config case.Reproducibility: yes. from source inspection. A config that selects
tools.web.search.provider: "brave"without an active Brave plugin becomes invalid, package-update doctor defers the missing install underOPENCLAW_UPDATE_IN_PROGRESS, and post-core plugin sync then skips because the config is invalid.Next step
This is a concrete upgrade-path bug with clear code boundaries, but it needs careful targeted tests around package-update doctor and invalid-config install recovery.
Review details
Best possible solution:
Make the 5.2 externalized-plugin upgrade repair run to completion for configured official plugins before the config-valid plugin sync gate, and keep install-time invalid-config recovery narrowly scoped to the requested official plugin id.
Do we have a high-confidence way to reproduce the issue?
Yes, from source inspection. A config that selects
tools.web.search.provider: "brave"without an active Brave plugin becomes invalid, package-update doctor defers the missing install underOPENCLAW_UPDATE_IN_PROGRESS, and post-core plugin sync then skips because the config is invalid.Is this the best way to solve the issue?
No, current main is not yet the best solution. The safer repair is a narrow upgrade recovery path that installs or explicitly carries forward configured official plugin candidates instead of marking the update repair complete while the config remains invalid.
Acceptance criteria:
pnpm check:changedin Testbox if runtime/config code changed.What I checked:
tools.web.search.provider: "brave"is rejected when the Brave web-search provider is not active, with the exact install/doctor message described in the report. (src/config/validation.ts:1069, 31e2276fe966)braveinstalls as@openclaw/brave-plugin; Discord and voice-call are also official external npm installs, so the reported plugin set is within the managed repair surface. (scripts/lib/official-external-plugin-catalog.json:21, 31e2276fe966)doctor --non-interactive --fixwithOPENCLAW_UPDATE_IN_PROGRESS=1, which changes missing plugin install repair behavior during the exact upgrade path. (src/cli/update-cli/update-command.ts:771, 31e2276fe966)deferredPluginIds; those ids are then filtered out ofmissingPluginIds, so no npm install candidate is attempted in that pass. (src/commands/doctor/shared/missing-configured-plugin-install.ts:549, 31e2276fe966)skippedfor an invalid config, which leaves the missing-plugin-invalid-config loop unresolved. (src/cli/update-cli/update-command.ts:897, 31e2276fe966)plugins install bravestill has an invalid-config gap:plugins installloads config before the official bare-id install branch can run, and invalid-config recovery is only granted when the request hasallowInvalidConfigRecovery: true; Brave does not set that flag. (src/cli/plugins-install-command.ts:422, 31e2276fe966)Likely related people:
src/commands/doctor/shared/missing-configured-plugin-install.ts,src/commands/doctor/shared/release-configured-plugin-installs.ts,src/cli/update-cli/update-command.ts)src/cli/plugins-install-command.ts,src/cli/plugin-install-plan.ts,src/cli/plugins-cli.install.test.ts)src/cli/update-cli/update-command.ts,src/config/validation.ts)Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 31e2276fe966.
ForestDengHK commentedon May 3, 2026
Same scenario on macOS — adds two extra failure modes
We hit this exact upgrade-path failure overnight via a launchd-managed auto-updater on macOS. The shape matches your report (Linux + brave/discord/voice-call), and we'd like to add two data points the OP didn't cover.
Environment
discord,whatsapp,voice-call~/.openclaw/npm/(nopackage.jsonpresent, same as the OP)Failure mode 1 — sequential
npm installdeletes siblingsAuto-updater's plugin-install loop runs
npm install @openclaw/<one>per plugin against~/.openclaw/npm/(nopackage.json), which behaves exactly as #76571 describes. Resulting state: only the last-installed plugin (discord) survives on disk;whatsappandvoice-callpackage directories are gone.installs.jsonstill records all three withinstallPathpointing at the now-missing dirs. The updater logs:After this point,
launchctl bootstrapreturns5: Input/output erroruntil manually recovered, because launchd has marked the service disabled. Visible only vialaunchctl print-disabled gui/$(id -u) | grep openclaw; fixed withlaunchctl enable gui/$(id -u)/<label>before re-bootstrapping.Failure mode 2 —
@openclaw/whatsapp@2026.5.2runtime crash, even after a clean installThis is the part not covered by the existing issues we could find. After manually reinstalling all three plugins together at matched versions (
npm install @openclaw/discord@2026.5.2 @openclaw/whatsapp@2026.5.2 @openclaw/voice-call@2026.5.2in one invocation, so siblings survive), the gateway loads all 12 plugins but WhatsApp specifically crashes during channel startup:Observation: the error originates in
src/channel.ts(lines ~90, ~204, ~260) where the plugin doesand
loadWhatsAppChannelRuntime()(insrc/shared.ts:93, which isawait import("./channel.runtime.js")) appears to resolve toundefinedin our environment.discordandvoice-callplugins use the same dynamic-import-of-.ts pattern and load fine — onlywhatsapptriggers it. We did not isolate the underlying cause.Reproduced on:
@openclaw/whatsapp@2026.5.2✗@openclaw/whatsapp@2026.5.2-beta.2✗ (same error)Tried (no effect):
rm -rf ~/.openclaw/tmp/jiti)openclaw plugins registry --refreshOne extra detail on the downgrade trap
When restoring an older binary on macOS,
~/.openclaw/service-env/<label>.envalso carriesOPENCLAW_SERVICE_VERSION='2026.5.2'after the partial update — we updated that to match the rolled-back binary. Worth mentioning in the suggested error-message hint alongsideOPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1.Workaround that worked
npm install -g openclaw@2026.4.29(whatsapp/discord/voice-call still bundled in core there)~/.openclaw/npm/node_modules/@openclaw/{discord,whatsapp,voice-call}(these are 2026.5.x-only)~/.openclaw/service-env/<label>.env:OPENCLAW_SERVICE_VERSION='2026.4.29'export OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS='1'launchctl enable gui/$(id -u)/<label>launchctl bootstrap gui/$(id -u) <plist>openclaw plugins registry --refreshHappy to file the
readWebAuthStateundefined as a separate issue if it isn't covered by something I missed — wanted to keep this thread focused on the umbrella upgrade-path story.steipete commentedon May 3, 2026
Closing as fixed on current
main.Proof checked against
d841394eba035723372a7120b34b8283514ec87e:f7522edb96: plugin npm installs run from the managed npm root manifest, so installing/updating one@openclaw/*package no longer prunes previously installed siblings.openclaw doctor --fixinstalls configured missing official plugins such as Brave from@openclaw/brave-plugin, preserves configured entries when repair fails, and avoids stale-plugin cleanup during update-mode deferral.src/commands/doctor/shared/missing-configured-plugin-install.test.ts:tools.web.search.provider: "brave"resolves to plugin idbraveand installs@openclaw/brave-plugininto the managed npm root.configured-plugin-installsscenario, with assertions that Brave is externally installed under~/.openclaw/npm/node_moduleswhile bundled/internal plugins are not incorrectly externalized.mainpasses:pnpm test src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/commands/doctor/shared/release-configured-plugin-installs.test.ts src/commands/doctor/repair-sequencing.test.ts src/cli/program/config-guard.test.ts src/plugins/install.npm-spec.test.ts-> 82 tests passing.The later WhatsApp
readWebAuthStatecrash report in this thread is a separate packaged WhatsApp runtime issue if it still reproduces on a build from currentmain; it is not the externalized-plugin upgrade deadlock described in the original report.jackiedepp commentedon May 4, 2026
Confirming fix on 2026.5.3 (06d46f7) from the original reporter — upgrade path now works end-to-end.
Walked our production install (the same Linode VPS / Singapore env from the OP) through the 4.29 → 5.3 upgrade today. End-state is clean: brave, discord, and voice-call all loaded as
2026.5.3from~/.openclaw/npm/node_modules/@openclaw/<pkg>/, gateway ready in 16s on the post-install restart.What worked vs what was broken in 5.2:
npm install -g openclaw@<new>@openclaw/*packages at~/.openclaw/npm/node_modules/installed plugin package requires compiled runtime outputwarning (per #77163) and skipped from the loaded set — visible failure instead of silent degradationopenclaw plugins update <name>dist/, updatesinstalls.json, prompts for restartopenclaw plugins update brave(odd-named pkg)brave→ npm package@openclaw/brave-plugincorrectly, printsPlugin manifest id "brave" differs from npm package name "@openclaw/brave-plugin"; using manifest id as the config keyand proceedsinstalls.jsonafter updating one pkgupdate brave,update discord,update voice-callcallsmeta.lastTouchedVersionafter upgradeTwo small leftover papercuts (not blockers, worth noting for completeness):
@openclaw/brave-pluginstill doesn't follow the@openclaw/<id>convention that the rest of the externalized set uses. The CLI handles the lookup transparently, so it's no longer a user-visible problem during install. But anyone tryingnpm install -g @openclaw/bravedirectly (which was the natural first guess in our 5.2 walkthrough) will still 404. Renaming to@openclaw/brave— even with a deprecation alias — would close out the last bit of 5.2's "documentation says X, npm has Y" friction.The new source-only TS rejection (fix(plugins): warn on source-only installed packages instead of blocking config #77163) means an in-place 5.3 binary upgrade temporarily breaks
web_searchfor any user whose 5.2 brave install was the source-only variant. The fix is a singleopenclaw plugins update braveafter the binary upgrade, which is fine — but it might be worth running that as part ofopenclaw doctor --fixautomatically when it detects aninstalls.jsonentry pointing at a TS-only package. Otherwise the gap between "binary upgraded" and "user runs CLI to fix brave" leaves web search broken with only a config warning to indicate why.Net: the upgrade path described in the OP is no longer broken. Thanks to @steipete and @vincentkoc for the install hardening pass — concrete improvement, and the new fail-loud-instead-of-silent behavior on bad packages is exactly the right call.