Skip to content

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 #107228

Closed

Description

@Marvinthebored

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 via openclaw 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.json aside). The mixed flat/generation resolution was observed against that repaired-but-possibly-inconsistent state.

Observed

  1. openclaw update → "Installing @openclaw/clickclack@2026.7.1 into …__openclaw-generation__g-…".
  2. Gateway restart → openclaw plugins list shows clickclack enabled, but the "location" column points at the flat dir, and its version is 2026.6.11 (the pre-upgrade version).
  3. Meanwhile deepseek/firecrawl/perplexity load from their generation dirs.
  4. 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/update guarantee 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.

Activity

  1. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Jul 14, 2026
  2. clawsweeper commented on Jul 14, 2026

    @clawsweeper
    Contributor

    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 --json evidence.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.
    • Include redacted logs or terminal output.

    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 --fix to 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 --json evidence.

    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:

    • The report does not separate persisted inventory location from the module path imported by the running Gateway, so loader precedence remains unproven.
    • Manual relocation of legacy state may have created an unsupported partial-migration state that a clean upgrade cannot reach.
    • If this state is reachable through a supported upgrade, users can silently run stale plugin code and miss plugin bug or security fixes.

    Codex review notes: model internal, reasoning high; reviewed against c4a2db93d99c.

    Label changes

    Label changes:

    • add P1: A supported update may report success while the Gateway continues executing stale plugin code, breaking a real plugin lifecycle workflow.
    • add 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.
    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • add 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:

    • Observed supported-upgrade failure: The reporter upgraded from v2026.6.11 to v2026.7.1 and recorded the updater installing clickclack 2026.7.1 into a generation directory while post-restart inventory identified the flat 2026.6.11 copy; recovery required manually mirroring the new files.
    • Reproduction caveat: The reporter explicitly says the state migration failed, legacy plugin-state files were moved aside manually, and the mismatch has not been reproduced on a clean v2026.7.1 install, so incomplete migration may be the actual root cause.
    • Cold inventory is not live runtime proof: Plugin documentation distinguishes persisted list/registry inspection from a live Gateway runtime probe and directs operators to plugins inspect <id> --runtime --json plus Gateway verification after plugin changes. Public docs: docs/cli/plugins.md. (docs/cli/plugins.md, c4a2db93d99c)
    • Canonical migration policy: Repository policy requires one canonical runtime state path, confines legacy normalization to doctor/migration code, and rejects steady-state fallback readers or parallel state paths. (AGENTS.md:310, c4a2db93d99c)
    • Product priority fit: VISION.md lists bug fixes, stability, and setup reliability as current priorities and requires doctor repair when a shipped state or configuration transition invalidates existing installs. (VISION.md:250, c4a2db93d99c)
    • Related stale-version symptom: [Bug]: openclaw plugins update --all downgrades manually-updated npm plugins to their originally-recorded install version #84256 reports official plugins remaining on old versions after core updates, but attributes that behavior to persisted exact npm selectors rather than flat-versus-generation path selection.

    Likely related people:

    • steipete: Recent merged history around plugin install persistence and manifest hardening connects this account to the same install and discovery boundary. (role: recent plugin install and manifest reviewer; confidence: medium; commits: 0608c1015b16, 7d2d8af3ab3e, 6bc5fe6952ff; files: src/cli/plugins-install-command.ts, src/cli/plugins-install-persist.ts, src/plugins/manifest.ts)
    • fuller-stack-dev: Recent release history credits this account on update recovery and plugin convergence work adjacent to the reported core-update/plugin-sync mismatch. (role: recent update and plugin convergence contributor; confidence: medium; files: src/cli/update-cli, src/plugins)
    • brokemac79: Recent release history credits this account on plugin install, doctor, and external-plugin diagnostic fixes relevant to migration recovery and managed install state. (role: recent plugin lifecycle and doctor contributor; confidence: low; files: src/commands, src/cli/plugins-install-command.ts, src/plugins)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  3. Marvinthebored commented on Jul 18, 2026

    @Marvinthebored
    ContributorAuthor

    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 from plugins list. Here it is, on a settled install.

    Environment: OpenClaw 2026.7.1 (2d2ddc4), upgraded 2026.6.11 → 2026.7.1 via openclaw 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:

    plugin flat project dir __openclaw-generation__ dir
    @openclaw/fireworks-provider 2026.6.11 2026.7.1
    @openclaw/moonshot-provider 2026.6.11 2026.7.1

    The 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):

    $ openclaw plugins inspect fireworks --runtime --json
      ...
      "version":     "2026.6.11",
      "source":      ".../openclaw-fireworks-provider-7293ca3d1e/node_modules/@openclaw/fireworks-provider/dist/index.js",
      "rootDir":     ".../openclaw-fireworks-provider-7293ca3d1e/node_modules/@openclaw/fireworks-provider",
      "installPath": ".../openclaw-fireworks-provider-7293ca3d1e/node_modules/@openclaw/fireworks-provider"
    

    moonshot is identical (runtime version: 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 list alone would not have surfaced this — the --runtime inspect 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 the plugins install-silently-no-ops half.

  4. metaforismo commented on Jul 19, 2026

    @metaforismo
    Contributor

    I reproduced the reported flat 2026.6.11 → generation 2026.7.1 transition on current main (f2137f41) using isolated state and Node 24.15.0.

    openclaw update repair updated the persisted install record from the old flat path to the __openclaw-generation__ path. Cold inspection and a live Gateway probe both loaded 2026.7.1; runtime reported imported: true while the old flat 2026.6.11 payload 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.

  5. self-assigned this
    on Jul 19, 2026
  6. steipete commented on Jul 19, 2026

    @steipete
    Contributor

    Fixed and landed in 22c336c0b46b via #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:

  7. locked as resolved and limited conversation to collaborators on Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions