Skip to content

[Bug]: Doctor does not report official managed plugin version drift after core upgrade #90891

Closed

Description

@brokemac79
Image

Bug type

Behavior bug (incorrect diagnostic state without crash)

Beta release blocker

No

Summary

After a stable core upgrade to 2026.6.1, an official managed codex plugin remained on 2026.5.30-beta.1; openclaw gateway status --deep correctly reported plugin version drift, but openclaw doctor --non-interactive only reported plugin counts/errors and did not surface the drift or the required openclaw plugins update codex repair.

Steps to reproduce

Observed on a live VPS after upgrading OpenClaw to the latest stable release:

  1. Upgrade core OpenClaw to 2026.6.1.
  2. Leave an official managed plugin install present from the prior version. In this case the runtime codex plugin was still 2026.5.30-beta.1.
  3. Run diagnostics that call openclaw gateway status --deep.
  4. Observe plugin version drift for the official codex plugin.
  5. Run openclaw doctor --non-interactive.
  6. Observe that doctor reports plugin loaded/error counts but does not report the official plugin version drift.
  7. Run openclaw plugins update codex && openclaw gateway restart.
  8. Observe that the drift disappears.

Expected behavior

openclaw doctor should include the same official managed plugin version drift check that openclaw gateway status --deep already performs, or clearly point users to the required deep status command.

For official runtime-critical plugins such as codex, doctor should surface an actionable warning like:

Plugin version drift: codex is 2026.5.30-beta.1, expected 2026.6.1.
Run: openclaw plugins update codex && openclaw gateway restart

Actual behavior

The drift was only visible through openclaw gateway status --deep / the custom diagnostics alert. openclaw doctor --non-interactive showed:

◇  Plugins ──────╮
│                │
│  Loaded: 13    │
│  Imported: 0   │
│  Disabled: 84  │
│  Errors: 0     │
│                │
├────────────────╯

Doctor did not mention the official codex plugin version mismatch or the manual repair command.

OpenClaw version

2026.6.1 (2e08f0f)

Operating system

Ubuntu 24.04.3 LTS

Install method

Global npm install, systemd user service (openclaw-gateway.service)

Model

openai/gpt-5.5 via OpenAI Codex runtime

Provider / routing chain

OpenClaw Gateway -> managed @openclaw/codex plugin -> Codex app-server -> OpenAI

Additional provider/model setup details

The host uses the official managed codex plugin from:

/home/ubuntu/.openclaw/npm/projects/openclaw-codex-8902d781d4/node_modules/@openclaw/codex

This was not the old split global install issue: the CLI and gateway both resolved to /usr/bin/openclaw / /usr/lib/node_modules/openclaw at 2026.6.1. The mismatch was specifically the managed official plugin copy under ~/.openclaw/npm/projects/....

Logs, screenshots, and evidence

Pre-repair diagnostic alert from Telegram screenshot (codex version bug.PNG, saved locally by reporter):

OpenClaw diagnostics alert: Gateway plugin version drift.

Evidence. openclaw gateway status --deep reports Plugin version drift: 1 active official plugin not on gateway 2026.6.1 and codex: 2026.5.30-beta.1 (npm) -> expected 2026.6.1.

Other checks passed: openclaw health --json ok, gateway running/probe ok, cron enabled, recent sampled cron runs ok, Telegram channel probe works.

Likely next step: run openclaw plugins update codex, then openclaw gateway restart.

Pre-repair gateway status --deep output captured from the affected host:

OpenClaw 2026.6.1 (2e08f0f)
Service: systemd user (enabled)
Command: /usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789
CLI version: 2026.6.1 (/usr/bin/openclaw)
Gateway version: 2026.6.1
Runtime: running
Connectivity probe: ok
Capability: admin-capable

Plugin version drift: 1 active official plugin not on gateway 2026.6.1
- codex: 2026.5.30-beta.1 (npm) -> expected 2026.6.1
Fix: openclaw plugins update <plugin-id> for each drifted plugin, then openclaw gateway restart.

Pre-repair openclaw plugins inspect codex --runtime --json excerpt:

{
  "plugin": {
    "id": "codex",
    "name": "Codex",
    "version": "2026.5.30-beta.1",
    "packageName": "@openclaw/codex",
    "source": "/home/ubuntu/.openclaw/npm/projects/openclaw-codex-8902d781d4/node_modules/@openclaw/codex/dist/index.js",
    "rootDir": "/home/ubuntu/.openclaw/npm/projects/openclaw-codex-8902d781d4/node_modules/@openclaw/codex",
    "origin": "global",
    "trustedOfficialInstall": true,
    "enabled": true,
    "activated": true,
    "status": "loaded",
    "providerIds": ["codex"],
    "agentHarnessIds": ["codex"]
  }
}

Repair command and output:

$ openclaw plugins update codex && openclaw gateway restart
Installing @openclaw/codex into /home/ubuntu/.openclaw/npm/projects/openclaw-codex-8902d781d4…
Linked peerDependency "openclaw" -> /usr/lib/node_modules/openclaw
Updated codex: 2026.5.30-beta.1 -> 2026.6.1.
Restart the gateway to load plugins and hooks.
Restarted systemd service: openclaw-gateway.service

Post-repair gateway status --deep no longer reports plugin drift:

OpenClaw 2026.6.1 (2e08f0f)
CLI version: 2026.6.1 (/usr/bin/openclaw)
Gateway version: 2026.6.1
Runtime: running
Connectivity probe: ok
Capability: admin-capable

Post-repair plugins inspect codex excerpt:

{
  "plugin": {
    "id": "codex",
    "version": "2026.6.1",
    "packageName": "@openclaw/codex",
    "source": "/home/ubuntu/.openclaw/npm/projects/openclaw-codex-8902d781d4/node_modules/@openclaw/codex/dist/index.js",
    "trustedOfficialInstall": true,
    "enabled": true,
    "activated": true,
    "status": "loaded"
  }
}

Post-repair doctor still illustrates the diagnostic gap: it reports plugin counts/errors, but not version alignment status:

◇  Plugins ──────╮
│                │
│  Loaded: 13    │
│  Imported: 0   │
│  Disabled: 84  │
│  Errors: 0     │
│                │
├────────────────╯

A journal excerpt around the repair shows the gateway restarting cleanly after the plugin update:

2026-06-06T09:16:51.899+00:00 [gateway] http server listening (9 plugins: active-memory, browser, codex, file-transfer, google, memory-core, memory-wiki, telegram, workboard; 5.7s)
2026-06-06T09:16:52.166+00:00 [gateway] ready
2026-06-06T09:16:52.642+00:00 [telegram] [default] starting provider (@Ant_clawd_bot)
2026-06-06T09:16:53.732+00:00 [telegram] [diag] isolated polling ingress started spool=/home/ubuntu/.openclaw/telegram/ingress-spool-default

Impact and severity

Affected: operators who rely on openclaw doctor after upgrades to validate production health, especially installs using official managed runtime plugins such as codex.

Severity: medium. The gateway can appear healthy while an official runtime-critical plugin is stale. This can cause confusing behavior after upgrade and makes the recommended post-upgrade check incomplete.

Frequency: observed once after a live stable upgrade to 2026.6.1; exact reproduction path from a clean install is not yet isolated.

Consequence: users may miss official plugin drift unless they know to run openclaw gateway status --deep or have custom diagnostics doing it for them.

Additional information

Related but not the same as #90418 / #90474. Those cover repeated legacy plugin install metadata warnings after plugins appear to update. This report is narrower: an official managed plugin actually remained on an old beta version, gateway status --deep correctly detected the drift, but doctor did not surface the same health failure.

Suggested fix: have doctor call/reuse the existing plugin version drift detector from gateway status --deep, at least for trusted official active plugins, and include the same repair command in doctor output.

Activity

  1. clawsweeper commented on Jun 6, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 6, 2026, 5:36 AM ET / 09:36 UTC.

    Summary
    Keep open. Current main and v2026.6.1 already have a plugin-version drift detector used by openclaw gateway status --deep, but doctor still renders only plugin counts, compatibility warnings, and registry diagnostics, so the reported post-upgrade diagnostic gap remains actionable.

    Reproducibility: yes. source-level reproduction is high confidence: seed an active official npm install record with an older resolvedVersion than the gateway version and compare the existing gateway status --deep drift warning with doctor’s current count-only plugin note. I did not run a live CLI repro because this sweep is read-only.

    Next step
    Safe repair lane: the existing gateway-status detector and rendering define the behavior; the remaining work is wiring equivalent warning output into doctor with focused regression coverage.

    Review details

    Best possible solution:

    Add a doctor health check or doctor plugin-status note that reuses detectPluginVersionDrift for local active official managed plugins and renders the same actionable update/restart guidance as gateway deep status.

    Do we have a high-confidence way to reproduce the issue?

    Yes, source-level reproduction is high confidence: seed an active official npm install record with an older resolvedVersion than the gateway version and compare the existing gateway status --deep drift warning with doctor’s current count-only plugin note. I did not run a live CLI repro because this sweep is read-only.

    Is this the best way to solve the issue?

    Yes, the best fix is to reuse the existing detectPluginVersionDrift and official install-record contract in doctor rather than adding a parallel detector or a new config surface.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No live VPS/current-main command reproduction was run in this read-only sweep; the fix should validate with a seeded managed official plugin drift state and, ideally, an upgrade-survivor style scenario.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against d4b4a658094e.

    Label changes

    Label changes:

    • add P2: This is a normal-priority upgrade diagnostic bug with a clear workaround through openclaw gateway status --deep, but it can leave production operators with incomplete doctor output after core upgrades.
    • add impact:other: The issue affects maintainer-visible upgrade health diagnostics for official managed plugins, which is meaningful but does not fit the narrower data-loss, security, crash, message, session, or auth-provider labels.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:queueable-fix: Current issue advisory state selects this label.
    • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.

    Label justifications:

    • P2: This is a normal-priority upgrade diagnostic bug with a clear workaround through openclaw gateway status --deep, but it can leave production operators with incomplete doctor output after core upgrades.
    • impact:other: The issue affects maintainer-visible upgrade health diagnostics for official managed plugins, which is meaningful but does not fit the narrower data-loss, security, crash, message, session, or auth-provider labels.
    Evidence reviewed

    Acceptance criteria:

    • node scripts/run-vitest.mjs src/plugins/plugin-version-drift.test.ts
    • node scripts/run-vitest.mjs src/cli/daemon-cli/status.gather.test.ts src/cli/daemon-cli/status.print.test.ts
    • node scripts/run-vitest.mjs src/commands/doctor-workspace-status.test.ts
    • git diff --check

    What I checked:

    • Repository policy applied: Root policy was read fully, plus the scoped plugins policy; upgrade-sensitive plugin/provider behavior and doctor diagnostics are core stability work rather than ClawHub routing. (AGENTS.md:28, d4b4a658094e)
    • Existing drift detector: Current main exposes detectPluginVersionDrift, which compares active official external plugin install records against the gateway version and returns sorted mismatches. (src/plugins/plugin-version-drift.ts:78, d4b4a658094e)
    • Gateway deep status already surfaces the drift: Gateway status gathers plugin drift from daemon install records and renders affected plugin ids, versions, and the plugins update plus gateway restart repair command. (src/cli/daemon-cli/status.gather.ts:654, d4b4a658094e)
    • Doctor still prints only plugin status counts: Doctor workspace status builds a registry snapshot and renders loaded/imported/disabled/error counts, compatibility warnings, and diagnostics, with no call to the drift detector or drift repair text. (src/commands/doctor-workspace-status.ts:77, d4b4a658094e)
    • Doctor gateway health does not compensate: The doctor gateway health path calls the Gateway status RPC and only notes CLI/Gateway version skew; it does not run the daemon-status drift detector used by gateway status --deep. (src/commands/doctor-gateway-health.ts:72, d4b4a658094e)
    • Shipped behavior matches the report: The v2026.6.1 tag contains the same doctor plugin count-only rendering and the same gateway-status drift rendering, matching the reporter's stable-release observation. (src/commands/doctor-workspace-status.ts:77, 2e08f0f4221f)

    Likely related people:

    • steipete: Commit 2514980 introduced the current plugin drift detector, gateway status drift rendering, and current doctor plugin summary in the checked-out history. (role: recent area contributor; confidence: high; commits: 25149801189f; files: src/plugins/plugin-version-drift.ts, src/cli/daemon-cli/status.gather.ts, src/cli/daemon-cli/status.print.ts)
    • Takhoffman: Commit 7da92cc is titled fix(regression): align doctor plugin status with runtime and touched src/commands/doctor-workspace-status.ts, making it relevant to doctor plugin diagnostics ownership. (role: doctor plugin-status history; confidence: medium; commits: 7da92cc61866; files: src/commands/doctor-workspace-status.ts)
    • vincentkoc: Commit cb4a298 routed gateway status through daemon status, and current main was also last touched by this author in adjacent plugin code. (role: gateway status adjacent owner; confidence: medium; commits: cb4a298961ca, d4b4a658094e; files: src/cli/daemon-cli/status.gather.ts, src/cli/daemon-cli/status.print.ts, src/plugins/embedding-providers.ts)
    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.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 6, 2026
  3. ZengWen-DT commented on Jun 6, 2026

    @ZengWen-DT
    Contributor

    I'd like to work on this.

    Approach: openclaw gateway status --deep already computes this via detectPluginVersionDrift() (src/plugins/plugin-version-drift.ts), but openclaw doctor never calls it. I'll wire the same detector into doctor's warning aggregation (src/commands/doctor/shared/preview-warnings.ts) so doctor surfaces an actionable drift warning with the openclaw plugins update <id> && openclaw gateway restart repair hint — additive, no runtime/config/migration changes. Will open a PR shortly.

  4. brokemac79 commented on Jun 6, 2026

    @brokemac79
    ContributorAuthor

    @ZengWen-DT please do not start on this. i am the author, and also a maintainer so i will do fix for this as i can best provide test proof. thanks

  5. added a commit that references this issue on Jun 7, 2026
    f0df7a9
  6. self-assigned this
    on Jun 8, 2026
  7. added a commit that references this issue on Jun 9, 2026
    72e4083
  8. added a commit that references this issue on Jun 9, 2026
    5072b86
  9. locked as resolved and limited conversation to collaborators on Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions