Repository navigation
Description
Summary
After upgrading a local macOS install from 2026.5.18 to 2026.6.1, OpenClaw repeatedly reports a legacy state migration/plugin install index warning for codex and discord, even though the plugin update appears to complete and the gateway runs normally.
Environment
- OpenClaw before:
2026.5.18 (50a2481) - OpenClaw after:
2026.6.1 (2e08f0f) - Platform: macOS arm64
- Install/update mode:
pnpm, stable channel - Gateway: LaunchAgent, loopback
127.0.0.1:18789 - Plugins involved:
@openclaw/codex,@openclaw/discord
Repro / observed flow
Ran supervised upgrade:
openclaw update --tag 2026.6.1 --yes --timeout 3600 --no-restartUpdate completed:
Update Result: OK
Root: /opt/homebrew/lib/node_modules/openclaw
Before: 2026.5.18
After: 2026.6.1
Steps:
✓ global update
✓ global install swap
✓ openclaw doctor
Then plugin update ran:
Updating plugins...
Installing @openclaw/codex into ~/.openclaw/npm/projects/openclaw-codex-8902d781d4…
Linked peerDependency "openclaw" -> /opt/homebrew/lib/node_modules/openclaw
Installing @openclaw/discord into ~/.openclaw/npm/projects/openclaw-discord-c0892df945…
Linked peerDependency "openclaw" -> /opt/homebrew/lib/node_modules/openclaw
npm plugins: 2 updated, 0 unchanged.
But the following warning appeared during the update, during openclaw gateway restart --wait 120s, and again during openclaw channels status --json:
[state-migrations] Legacy state migration warnings:
- Left plugin install index in place because shared SQLite state has conflicting plugin install metadata for: codex, discord
Doctor warnings:
- Left plugin install index in place because shared SQLite state has conflicting plugin install metadata for: codex, discord
Expected behavior
After a successful plugin update, the install index/shared SQLite metadata should either:
- reconcile the new plugin install records automatically, or
- emit a one-time actionable repair command that clears the stale/conflicting records safely.
The warning should not keep recurring on normal health/status/restart flows if the runtime is healthy.
Actual behavior
The warning repeats across multiple commands even though runtime validation succeeds.
Post-upgrade validation:
openclaw --version -> OpenClaw 2026.6.1 (2e08f0f)
openclaw gateway status -> CLI version 2026.6.1, Gateway version 2026.6.1, connectivity probe ok
openclaw health --json -> ok=true, plugins loaded include codex and discord, plugin errors=[]
openclaw channels status --json -> Discord and Telegram running; all enabled Discord accounts eventually connected
Impact
This looks non-fatal, but it is noisy and confusing during upgrades. It makes operators unsure whether codex/discord plugin installs are clean or whether a stale install index may affect future plugin repair/update behavior.
Suggested fix
- Add a deterministic migration/repair path for conflicting shared SQLite plugin install metadata.
- If automatic repair is unsafe, include exact operator guidance in the warning, e.g. a specific
openclaw doctor --fix/plugin repair command or a dry-runable cleanup command. - Suppress repeated warnings after the runtime has proven that the affected plugins are installed, linked, and loaded cleanly, or downgrade to a status note with remediation.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 4, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 4, 2026, 1:09 PM ET / 17:09 UTC.
Summary
Keep this open: current main still has a conflict branch that leaves the legacy plugin install index in place, so a user with conflicting codex/discord install metadata can keep seeing the same warning across doctor/status/restart flows.
Reproducibility: yes. source inspection gives a high-confidence reproduction path for the repeated warning: leave a conflicting legacy
plugins/installs.jsonbeside a shared SQLiteinstalled_plugin_index, then run a legacy-state migration path. I did not run the full macOS upgrade scenario locally.Next step
A focused repair can target the legacy install-index conflict policy and add regression coverage without adding config or changing plugin APIs.
Review details
Best possible solution:
Teach the legacy install-index migration to deterministically retire superseded official plugin records after successful current install validation, while keeping clear doctor guidance for true metadata conflicts.
Do we have a high-confidence way to reproduce the issue?
Yes, source inspection gives a high-confidence reproduction path for the repeated warning: leave a conflicting legacy
plugins/installs.jsonbeside a shared SQLiteinstalled_plugin_index, then run a legacy-state migration path. I did not run the full macOS upgrade scenario locally.Is this the best way to solve the issue?
Yes, the requested direction is the right layer: this should be fixed in core legacy state/plugin install index migration rather than in codex or discord plugin code. The narrowest maintainable fix is safe reconciliation for superseded records plus actionable guidance for conflicts that cannot be proven safe.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against e11e4e89351a.
Label changes
Label changes:
P2: This is a normal upgrade/state cleanup bug with confusing repeated warnings but no reported runtime outage.impact:other: The affected surface is persistent plugin install metadata and upgrade diagnostics, which is maintainer-visible but outside the more specific impact labels.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.Label justifications:
P2: This is a normal upgrade/state cleanup bug with confusing repeated warnings but no reported runtime outage.impact:other: The affected surface is persistent plugin install metadata and upgrade diagnostics, which is maintainer-visible but outside the more specific impact labels.Evidence reviewed
Acceptance criteria:
What I checked:
src/infra/state-migrations.ts:1501, e11e4e89351a)src/infra/state-migrations.ts:2628, e11e4e89351a)src/flows/doctor-health-contributions.ts:357, e11e4e89351a)src/commands/doctor-state-migrations.test.ts:1513, e11e4e89351a)docs/cli/plugins.md. (docs/cli/plugins.md:358, e11e4e89351a)Likely related people:
src/infra/state-migrations.ts,src/commands/doctor-state-migrations.test.ts,src/cli/update-cli/post-core-plugin-convergence.ts)src/infra/state-migrations.ts,src/cli/update-cli/update-command.ts,src/plugins/installed-plugin-index-store.ts)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.jarvis-drakon commentedon Jun 5, 2026
Confirming this on OpenClaw 2026.6.1 (2e08f0f), fresh-ish host upgraded in place. Same recurring
openclaw doctorwarning, doesn't clear across gateway restarts:Root cause (reproduced locally): the data is already migrated — the shared
installed_plugin_indexrow in~/.openclaw/state/openclaw.sqlitecontains all the listed plugins. The migrator nonetheless refuses to retire the legacy~/.openclaw/plugins/installs.jsonbecause the fingerprints mismatch, so it conservatively leaves the legacy file → warning recurs forever:installs.jsonhost_contract_version2026.6.12026.5.28compat_registry_version5680dbd9…83616130…policy_hashmigration_version11The legacy file's
refreshReasonissource-changed, suggesting an@latest-spec plugin re-resolves on boot and rewrites the legacy fingerprint, perpetuating the mismatch even after the shared state is authoritative.Suggested reconcile rule: when the shared row already contains the records and carries a newer
host_contract_version, treat the legacy file as stale → retire it (rename.migrated/ delete) rather than flagging a conflict. Precedence byhost_contract_versionwould makedoctor --fixidempotent.Same underlying issue as #90213 and closed #90040 (no native reconcile path). Happy to provide the full sqlite dump if useful.
clentjewell commentedon Jun 6, 2026
Confirming this issue on macOS arm64 (Mac mini), upgrading from an earlier version to 2026.6.1.
Plugins affected:
@openclaw/brave-pluginand@openclaw/whatsapp(rather than codex/discord, but same symptom and root cause).Context: Both plugins were originally installed to
~/.openclaw/npm/node_modules/(old-style). After upgrading to 2026.6.1, runningopenclaw plugins update braveandopenclaw plugins update whatsappcreated new project-based installs under~/.openclaw/npm/projects/, but the SQLite state retained entries for both the old and new paths — hence "conflicting plugin install metadata".What we tried:
openclaw plugins update brave/whatsapp— installs to new project dirs but SQLite conflict remainsopenclaw plugins install @openclaw/brave-plugin --force— same resultopenclaw plugins doctor— reports "No plugin issues detected" despite the warningsopenclaw gateway install --force— gateway healthy, warnings persist on every CLI invocationWorkaround in progress: Overnight uninstall + clean reinstall of both plugins (
openclaw plugins uninstall brave && openclaw plugins install @openclaw/brave-plugin). Will report back if that clears the SQLite state.Functional impact: None — gateway runs normally, Slack connected, web search (brave) operational. Purely cosmetic but noisy on every
openclawinvocation. Would be good to haveopenclaw plugins doctordetect and repair this case.segway-virtus commentedon Jun 8, 2026
Confirming this on Windows 10, OpenClaw 2026.6.5-beta.2 with
@openclaw/feishu(same root cause as codex/discord/brave/whatsapp reported above).What happened
After upgrading from 2026.6.1 → 2026.6.5-beta.2,
openclaw gateway statuspersistently reported:openclaw plugins update feishuresolved to 2026.5.20 (stable), not the beta, actually downgrading the plugin.Root cause (3-layer storage mismatch)
The plugin version is tracked across three independent stores — all must agree:
~/.openclaw/npm/projects/openclaw-feishu-<hash>/node_modules/~/.openclaw/state/openclaw.sqlite→installed_plugin_index.install_records_json2026.5.20, ignores manual npm install~/.openclaw/plugins/installs.jsondoctorto leave index in placeAdditionally:
openclaw plugins updateresolves via compat registry → defaults to latest stable (2026.5.20), not beta (2026.6.5-beta.2), so it can silently downgrade.Resolution (manual, for feishu on Windows)
Delete legacy installs.json and refresh registry:
Direct npm install in the managed projects directory (bypass
openclaw plugins updatewhich resolves to stable):Patch SQLite install_records_json to match the actual version on disk:
Restart gateway:
openclaw gateway restartAfter these steps,
openclaw gateway statusshows no plugin version drift.Full technical writeup available if helpful — happy to share.
abelaibricker commentedon Jun 8, 2026
Confirmando o mesmo sintoma em outro setup (Linux Ubuntu 24, OpenClaw 2026.6.1 / 2e08f0f, systemd user service):
doctor,gateway restart,channels status, no boot do gateway (state-migrations subsystem)openclaw plugins registry --refreshnão resolve (já rodado).plugins update slackreporta "up to date (2026.6.1)" mas o warning persiste.Observação extra: o
state-migrationsarquiva o legacyinstalls.jsonapenas se não houver conflito de versão, e como há (5.28 vs 6.1), o arquivo legacy nunca é arquivado. Workaround atual: ignorar o warning (issue #90040 já fechou como "stderr-only em --json"), mas seria útil ter umopenclaw plugins registry --reconcile-install-indexoudoctor --fixscoped pra isso, como o reporter original sugeriu.Caso relacionado/irmão: #90040 (CLOSED como already-implemented, mas só pro caso de --json corruption).
100yenadmin commentedon Jun 14, 2026
Confirming the same stale shared-state/legacy-index class on a macOS LaunchAgent install.
Environment:
2026.6.5 (5181e4f)@martian-engineering/lossless-claw0.12.0under an hour before this repair runWhat now reports correctly:
openclaw plugins listreports Lossless Context Management as0.12.0.~/.openclawresolves@martian-engineering/lossless-claw@0.12.0.openclaw plugins install @martian-engineering/lossless-claw@0.12.0 --forcesucceeds.openclaw plugins registry --refresh --jsoncomputes a refreshed registry wherelossless-clawinstall/package metadata is0.12.0.gpt-5.4-mini:tokensBefore=242272,tokensAfter=37035,createdSummaryId=sum_490d8869519781bf, no truncation marker on the new summaries.What remains stale:
~/.openclaw/plugins/installs.jsonstill hasinstallRecords.lossless-claw.specas@martian-engineering/lossless-claw@0.11.2.version,resolvedVersion, andresolvedSpecat0.11.2.packageVersion: 0.11.2.Left plugin install index in place because shared SQLite state has conflicting plugin install metadata for: acpx, codex, lossless-claw, tokenjuiceCommands that did not clear the stale legacy index:
So this is non-fatal for runtime in this case, but the repair/refresh path appears incomplete:
registry --refresh --jsoncan compute the correct0.12.0state, while the staleplugins/installs.jsonstate is left in place and keeps producing the conflict warning.Expected behavior:
openclaw doctor --fix, because doctor currently wants to touch unrelated cron/security/bootstrap items too.jmar5439 commentedon Jun 15, 2026
same here