Repository navigation
Description
2026.7.1 plugin loader resolves inconsistently between flat project dirs and new __openclaw-generation__ dirs — a plugins install/sync of a new version can silently not take effect
Honest caveat up front: I observed this during and after a failed-then-manually-repaired state migration (see companion issue about the migration gate). I have not reproduced it on a clean 2026.7.1 install, so it may be a symptom of the incomplete migration rather than an independent loader bug. Filing it because the observed behavior — an installed new plugin version silently not loading — is severe if it's real, and because I don't understand the intended selection logic. Please treat the "is this a bug or expected?" question as the first thing to answer.
Summary
On this 2026.7.1 install, openclaw plugins list shows plugins loading from two different location schemes at once:
- some from the flat project dir:
~/.openclaw/npm/projects/<name>-<hash>/node_modules/@openclaw/<pkg> - some from a new generation dir:
~/.openclaw/npm/projects/<name>-<hash>__openclaw-generation__g-<hash>/node_modules/@openclaw/<pkg>
Concretely, on the same install:
| Plugin | Loaded from | Version loaded |
|---|---|---|
deepseek, firecrawl, perplexity (providers) |
generation dir | 2026.6.11 |
clickclack |
flat dir | 2026.6.11 (stale — see below) |
codex (freshly installed) |
flat dir | 2026.7.1 |
The damaging consequence: openclaw update's plugin sync installed @openclaw/clickclack@2026.7.1 into a __openclaw-generation__ dir, but the loader kept using the flat dir at 2026.6.11. The update reported the plugin installed; plugins list showed it enabled; but the loaded code was the old version. It only took effect after I manually copied the 2026.7.1 content into the flat dir.
Environment
- OpenClaw 2026.7.1 (
2d2ddc4), upgraded from 2026.6.11 viaopenclaw update(npm, stable), macOS, Node 25.9.0, launchd gateway. - Long-lived install, and — importantly — the migration into the new shared-SQLite plugin index did not complete cleanly and was repaired by hand (moving legacy
installs.json/update-check.jsonaside). The mixed flat/generation resolution was observed against that repaired-but-possibly-inconsistent state.
Observed
openclaw update→ "Installing @openclaw/clickclack@2026.7.1 into …__openclaw-generation__g-…".- Gateway restart →
openclaw plugins listshowsclickclackenabled, but the "location" column points at the flat dir, and its version is 2026.6.11 (the pre-upgrade version). - Meanwhile
deepseek/firecrawl/perplexityload from their generation dirs. - So the install target (generation dir) and the load source (flat dir) disagree for some plugins → a "successful" plugin install/update silently has no effect.
Questions for maintainers (before treating as a confirmed bug)
- In 2026.7.1, which is the canonical load source — the flat project dir or the
__openclaw-generation__dir? - Is generation→loaded "promotion" gated on the state migration completing cleanly? (If so, this is likely a symptom of the migration issue, and the fix belongs there.)
- If both schemes are expected to coexist, what determines which one wins per plugin, and should
plugins install/updateguarantee the newly-installed version is the one that loads?
Expected
openclaw plugins install / the openclaw update plugin sync should guarantee that the version they install is the version the loader actually loads — never leave a newer install in a directory the loader ignores while continuing to run an older copy.
Workaround (what I did)
Manually mirror the intended (new) plugin version into the dir the loader actually reads (the flat dir), then restart. Obviously not something a normal user would find.
Impact if real
A routine plugins update / openclaw update can silently no-op — the user believes a plugin is updated (install succeeded, plugins list shows the new version "installed") while the gateway keeps executing the old code. Hard to notice, easy to misattribute.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jul 14, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 14, 2026, 7:48 AM ET / 11:48 UTC.
Summary
This fresh, specific report describes a serious supported-upgrade invariant, and neither current main nor v2026.7.1 is proven to fix it. Keep it open, but treat loader precedence as unconfirmed until migration state and the live runtime source are captured separately from
plugins list, which is not a live Gateway import probe.Reproducibility: no. The report provides a strong observed sequence, but it followed a failed migration and manual state repair and lacks a clean current-main reproduction with live
plugins inspect <id> --runtime --jsonevidence.Ways to help us reproduce this
Next step
First reproduce the v2026.6.11-to-v2026.7.1 migration with unmodified state and compare the persisted active generation, cold registry location, and live Gateway-imported plugin path before selecting the repair boundary.
Review details
Best possible solution:
Advance the authoritative managed-plugin record and active generation atomically, make runtime discovery consume only that canonical root, and teach
openclaw doctor --fixto repair or clearly reject incomplete flat-to-generation migrations without manual file copies.Do we have a high-confidence way to reproduce the issue?
No. The report provides a strong observed sequence, but it followed a failed migration and manual state repair and lacks a clean current-main reproduction with live
plugins inspect <id> --runtime --jsonevidence.Is this the best way to solve the issue?
No, manual directory mirroring is not the best solution. The maintainable fix belongs at the canonical install-record, generation-promotion, and doctor-recovery boundary rather than in another loader fallback.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against c4a2db93d99c.
Label changes
Label changes:
P1: A supported update may report success while the Gateway continues executing stale plugin code, breaking a real plugin lifecycle workflow.impact:ux-friction: Diagnosis and recovery currently require inspecting internal paths and manually moving state or plugin files, with no ordinary product recovery path demonstrated.issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.Label justifications:
P1: A supported update may report success while the Gateway continues executing stale plugin code, breaking a real plugin lifecycle workflow.impact:ux-friction: Diagnosis and recovery currently require inspecting internal paths and manually moving state or plugin files, with no ordinary product recovery path demonstrated.Evidence reviewed
What I checked:
plugins inspect <id> --runtime --jsonplus Gateway verification after plugin changes. Public docs:docs/cli/plugins.md. (docs/cli/plugins.md, c4a2db93d99c)AGENTS.md:310, c4a2db93d99c)VISION.md:250, c4a2db93d99c)Likely related people:
src/cli/plugins-install-command.ts,src/cli/plugins-install-persist.ts,src/plugins/manifest.ts)src/cli/update-cli,src/plugins)src/commands,src/cli/plugins-install-command.ts,src/plugins)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Marvinthebored commentedon Jul 18, 2026
Clean-state reproduction with the live runtime probe (as requested)
Following up on the triage note asking for the live runtime source captured via
plugins inspect, separately fromplugins list. Here it is, on a settled install.Environment: OpenClaw 2026.7.1 (
2d2ddc4), upgraded2026.6.11 → 2026.7.1viaopenclaw update(npm, stable channel), macOS, Node 25.9.0. This is 4 days post-upgrade and the startup-migration gate (#107227) has since completed cleanly and that issue is closed/fixed — so everything below is independent of the migration.Two bundled provider plugins remain divergent between the flat project dir and the
__openclaw-generation__dir:__openclaw-generation__dir@openclaw/fireworks-provider@openclaw/moonshot-providerThe generation dir holds 2026.7.1 — the version
openclaw update's plugin sync installed. But the live runtime probe resolves to the flat dir (old version):moonshotis identical (runtimeversion: 2026.6.11, source = its flat dir). Neither path is the__openclaw-generation__dir.So on this install the update genuinely did not take effect for these two plugins: 2026.7.1 is installed (in the generation dir) but the runtime imports 2026.6.11 from the flat dir.
plugins listalone would not have surfaced this — the--runtimeinspect is what pins the actually-loaded source and version.Standalone bug, not a migration symptom
To answer the open "is this its own bug or a symptom of the migration issues" question: this persists days after the migration completed and #107227 was fixed/closed, on a stable gateway. It is not a migration artifact. It's a loader-precedence issue on the upgrade path: an upgrade leaves the pre-existing flat project dirs in place, the plugin sync writes the new version into a
__openclaw-generation__dir, and the loader keeps resolving the flat dir. A fresh install wouldn't have both dirs and so wouldn't hit it — but every upgrading install lands in exactly this state.Not done (available on request)
I did not run the mutating repro (
openclaw plugins install @openclaw/fireworks-provider@2026.7.1, then re-probe to show it still loads 2026.6.11 from the flat dir) to avoid perturbing a production install. The observational evidence above is conclusive and mutation-free; happy to run the install-repro if it would help confirm theplugins install-silently-no-ops half.metaforismo commentedon Jul 19, 2026
I reproduced the reported flat
2026.6.11→ generation2026.7.1transition on current main (f2137f41) using isolated state and Node 24.15.0.openclaw update repairupdated the persisted install record from the old flat path to the__openclaw-generation__path. Cold inspection and a live Gateway probe both loaded2026.7.1; runtime reportedimported: truewhile the old flat2026.6.11payload was still present.The full build passed, along with 156 focused plugin lifecycle tests. This is consistent with the lifecycle fixes in #98422 and #107691. I cannot reproduce the stale flat selection on current main, so I do not think another fix PR is needed.
fix(plugins): load active generation after upgrades (#111141)
steipete commentedon Jul 19, 2026
Fixed and landed in
22c336c0b46bvia #111141.The root cause was recovery order: when both an old flat managed-plugin project and a newer generation project existed, recovery could choose by directory ordering instead of the install ledger's active generation. The landed fix makes a usable persisted install record authoritative, preserves intentional downgrades, uses an install-time fallback only when authority is absent or dangling, and emits a structured warning for that fallback. Doctor now owns convergence: it records the recovered active generation and retires stale managed generations for post-shutdown cleanup without mutating plugin trees during runtime loading.
Proof:
fix(plugins): load active generation after upgrades (openclaw#111141)
fix(plugins): load active generation after upgrades (openclaw#111141)