Skip to content

plugins install fails with npm EOVERRIDE: shipped pnpm-workspace.yaml overrides conflict with stale managed peer pins (2026.6.5) #91772

Closed

Description

@mkdelta221

Summary

On OpenClaw 2026.6.5, openclaw plugins install can fail deterministically with npm EOVERRIDE for managed npm-root projects whose manifests were created by earlier OpenClaw versions. Two behaviours compound:

  1. 2026.6.5 imports pnpm workspace overrides into managed npm roots. readOpenClawManagedNpmRootOverrides() now calls readHostWorkspaceOverrides(packageRoot), which reads the pnpm-workspace.yaml that ships inside the published npm package and exports its overrides: block (~26 entries, including hono: 4.12.18, @hono/node-server: 1.19.14, @aws-sdk/*) into ~/.openclaw/npm/projects/<name>-<hash>/package.json as npm overrides — including pins for packages that are not part of the host's runtime dependency graph.

  2. Managed peer-dependency pins never advance. syncManagedNpmRootPeerDependencies() keeps an existing pin via nextDependencies[packageName] = dependencies[packageName] ?? dependencySpec. A project manifest that earlier OpenClaw versions pinned to hono: "4.12.23" (recorded in openclaw.managedPeerDependencies) keeps that exact spec forever.

The combination writes a manifest npm itself rejects: dependencies.hono = "4.12.23" plus overrides.hono = "4.12.18". npm's assertRootOverrides (@npmcli/arborist/lib/node.js) throws EOVERRIDE because an override may not change the effective spec of a root direct dependency:

npm error code EOVERRIDE
npm error Override for hono@4.12.23 conflicts with direct dependency

The install then rolls back the manifest, so the conflicting state is invisible after the fact — which makes this confusing to debug. (I captured the mid-install manifest by snapshotting package.json on a 50 ms loop while the install ran.)

Environment

  • OpenClaw 2026.6.5 (5181e4f), installed via npm into ~/.npm-global
  • node v24.16.0, npm 11.13.0, Linux (systemd)
  • Plugin being updated: @drakon-systems/shieldcortex-realtime (extension-format pack, openclaw.extensions; it declares no hono dependency and no overrides itself)

Reproduction

  1. A managed project at ~/.openclaw/npm/projects/<plugin>-<hash>/ whose package.json contains a stale managed peer pin, e.g. "hono": "4.12.23" in dependencies with "hono" listed in openclaw.managedPeerDependencies (created by a pre-2026.6 OpenClaw; observed on several machines).
  2. Upgrade host to 2026.6.5.
  3. openclaw plugins install --force <plugin>@latest → EOVERRIDE, rollback, plugin left on the previous version.

Mid-install manifest captured right before npm ran (trimmed):

{
  "dependencies": {
    "@drakon-systems/shieldcortex-realtime": "4.31.2",
    "hono": "4.12.23",
    "...": "..."
  },
  "overrides": {
    "hono": "4.12.18",
    "@hono/node-server": "1.19.14",
    "@anthropic-ai/sdk": "0.100.1",
    "...": "..."
  },
  "openclaw": {
    "managedOverrides": ["hono", "..."],
    "managedPeerDependencies": ["hono", "..."]
  }
}

Impact

  • Every subsequent plugin install/update in an affected project fails until the manifest is repaired by hand.
  • After the npm failure the installer prints Also not a valid hook pack: Error: package.json missing openclaw.hooks, which is misleading for extension-format packs — the actionable error is the npm one.
  • Related: because existing pins are never advanced, plugins can keep running against stale peer-dependency versions indefinitely even when installs succeed (we found a plugin running against a peer lib several versions behind the plugin itself).

Workaround

Edit the project package.json: delete the stale entry (e.g. hono) from both dependencies and openclaw.managedPeerDependencies, then re-run the install. The peer plan re-pins it consistently with the override and the install succeeds.

Suggested fixes

  • (a) Before running npm, reconcile managed overrides against root dependencies: if an override key is also a root dependency in the managed root, align the dependency spec to the override (or drop that override key). This makes EOVERRIDE structurally impossible.
  • (b) Advance managed peer pins from the fresh peer plan rather than unconditionally preserving the existing spec (dependencies[name] ?? dependencySpec).
  • (c) Optionally filter workspace overrides to packages actually reachable in the host runtime graph before exporting them to plugin roots.

Happy to provide more detail or test a fix.

Activity

  1. clawsweeper commented on Jun 9, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 20, 2026, 12:43 PM ET / 16:43 UTC.

    Summary
    Keep open: current main and latest release still preserve stale managed peer pins while importing fresh managed overrides, and the open linked PR is the active fix candidate rather than a reason to close before merge.

    Reproducibility: yes. Source inspection shows a managed root with stale dependencies.hono and openclaw.managedPeerDependencies can receive a newer managed overrides.hono before npm runs, which npm Arborist rejects as EOVERRIDE.

    Root-cause cluster
    Relationship: canonical
    Canonical: #91772
    Summary: This issue is the canonical user report for stale managed peer pins conflicting with managed npm-root overrides; the active fix candidate is the open maintainer PR.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Next step
    A linked open maintainer PR already owns the implementation, so ClawSweeper should not queue a competing fix PR.

    Review details

    Best possible solution:

    Review and land #91786 if maintainers accept its managed-root upgrade behavior, then close this issue as implemented while tracking the misleading post-failure hook-pack message separately.

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

    Yes. Source inspection shows a managed root with stale dependencies.hono and openclaw.managedPeerDependencies can receive a newer managed overrides.hono before npm runs, which npm Arborist rejects as EOVERRIDE.

    Is this the best way to solve the issue?

    Yes. The fix belongs in shared managed npm-root reconciliation across install/update/rollback writers; the open PR is the best current path, pending maintainer acceptance of the upgrade rewrite behavior.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The linked fix rewrites persisted OpenClaw-managed peer pins and override metadata, so maintainers still need to accept the upgrade behavior before merge.
    • This read-only review did not execute a packaged plugin install/update repro; confidence comes from source tracing, reporter runtime evidence, npm contract source, and the open fix PR's tests.

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

    Label changes

    Label justifications:

    • P1: Affected managed plugin npm roots can have every later plugin install or update blocked by npm EOVERRIDE.
    • impact:other: The concrete impact is managed plugin install/update failure and possible plugin disablement, which is maintainer-visible but outside the more specific owned impact labels.
    Evidence reviewed

    What I checked:

    • Current main imports host workspace overrides: readOpenClawManagedNpmRootOverrides() reads pnpm-workspace.yaml from the OpenClaw package root and returns its overrides block for managed npm roots. (src/infra/npm-managed-root.ts:231, 2166652eb3e8)
    • Current main preserves stale managed peer pins: syncManagedNpmRootPeerDependencies() still writes dependencies[packageName] ?? dependencySpec, then assigns managed overrides without reconciling same-name root dependencies. (src/infra/npm-managed-root.ts:798, 2166652eb3e8)
    • Plugin install path reaches the conflict before npm runs: The install path reads managed overrides, upserts the managed root dependency, syncs peer dependencies, and then invokes npm in the managed root. (src/plugins/install.ts:1285, 2166652eb3e8)
    • Latest release still has the same source shape: v2026.6.8 contains the same stale-pin preservation line in syncManagedNpmRootPeerDependencies(), so there is no shipped fix yet. (src/infra/npm-managed-root.ts:799, 844f405ac1be)
    • npm contract matches the reported failure: npm Arborist's assertRootOverrides() throws EOVERRIDE when an override changes a root direct dependency's effective spec, matching the stale pin plus newer override manifest.
    • Open fix candidate is still open and linked: The linked PR is open, mergeable, and uses closing references for this issue while adding reconciliation tests and implementation in the managed npm-root surface. (c863293cdd94)

    Likely related people:

    • vincentkoc: Commit 392af2e changed managed npm-root override loading to read the shipped pnpm-workspace.yaml override set. (role: introduced related override export behavior; confidence: high; commits: 392af2e61201; files: src/infra/npm-managed-root.ts, pnpm-workspace.yaml)
    • steipete: Commit d9ff8cf added the npm lockfile peer planner and fallback pin preservation path that can keep stale managed peer pins alive. (role: managed peer planner contributor; confidence: high; commits: d9ff8cfb012e; files: src/infra/npm-managed-root.ts, src/infra/npm-managed-root.test.ts, src/plugins/install.ts)
    • fuller-stack-dev: The managed peer planner commit credits fuller-stack-dev as a co-author in the commit message. (role: managed peer planner co-author; confidence: medium; commits: d9ff8cfb012e; files: src/infra/npm-managed-root.ts, src/plugins/install.ts)
    • amknight: amknight authored the open PR that closes this issue and implements managed-root reconciliation with focused tests. (role: current fix owner; confidence: high; commits: c863293cdd94; files: src/infra/npm-managed-root.ts, src/infra/npm-managed-root.test.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
    P1High-priority user-facing bug, regression, or broken workflow.
    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 9, 2026
  3. mkdelta221 commented on Jun 13, 2026

    @mkdelta221
    Author

    Reproduced on OpenClaw 2026.6.6 — EOVERRIDE on plugin update, plugin then silently disabled

    Confirming this is still live on 2026.6.6 and adding a root-cause trace. openclaw update / openclaw plugins install --force fails for our plugin (@drakon-systems/shieldcortex-realtime) with:

    npm error code EOVERRIDE
    npm error Override for hono@4.12.23 conflicts with direct dependency
    

    OpenClaw then sets plugins.entries.<id>.enabled = false and continues without the plugin, so the failure is easy to miss until telemetry from the plugin goes quiet.

    Mechanism (verified against the installed bundled dist)

    Line numbers below are from the bundled dist/ of 2026.6.6 (npm-managed-root-BivTh0Ci.js, install-*.js) and will differ from the source repo; the symbol names are stable and should map cleanly.

    Each plugin gets a managed npm "project" at ~/.openclaw/npm/projects/<name>-<hash>/package.json containing dependencies (managed peer pins), overrides (imported from OpenClaw's bundled pnpm-workspace.yaml), and an openclaw: { managedOverrides, managedPeerDependencies } tracking block.

    1. readHostWorkspaceOverrides() (npm-managed-root-*.js:56) and readOpenClawManagedNpmRootOverrides() (:88) import OpenClaw's pnpm-workspace.yaml overrides into the managed manifest's overrides. These advance every release — currently hono: 4.12.21 in pnpm-workspace.yaml:73.
    2. collectNpmLockPeerDependencyPins() (:207) derives managed peer-dep pins from the resolved lockfile's peerDependencies and writes them into dependencies.
    3. syncManagedNpmRootPeerDependencies() (:387) is where the two collide:
      • :398-400 writes peer pins to dependencies, but preserves any existing pin: nextDependencies[packageName] = dependencies[packageName] ?? dependencySpec.
      • :404-405 clears prior managed override keys, then Object.assign(overrides, managedOverrides) writes the current override version — with no check that the same key also sits in dependencies at a different version.
    4. On update, the stale managed-peer pin is additionally kept alive by the fallback path: collectExistingManagedPeerDependencyPins() + its use in collectNpmResolvedManagedNpmRootPeerDependencyPins() (:263, :296) and the return fallbackPeerPins on resolution failure (:339). So the pin from an older OpenClaw era survives even though the override version has since moved on.

    Root cause: the managed-peer dependency pin never advances across OpenClaw upgrades, but the imported override does advance each release. When a package ends up in BOTH dependencies (stale, e.g. hono@4.12.23 from an older era) and overrides (current, e.g. hono@4.12.21), npm's assertRootOverrides rejects the manifest — you may not override a root direct dependency at a different version.

    Version-mismatch nuance (verified empirically): the conflict fires only on a version mismatch. When dependencies.hono and overrides.hono are the same version, the install succeeds. Deleting the stale dependencies.hono and reinstalling makes OpenClaw re-derive it at the override version in both places (4.12.21), and the install then succeeds. (After applying that workaround locally, our managed manifest now reads hono: 4.12.21 in both dependencies and overrides, and updates pass.)

    This is not a plugin-side bug

    • The published plugin manifest declares zero dependencies and zero overrides — only peerDependencies: { shieldcortex: ">=4.18.3 <5.0.0", openclaw: ">=2026.3.22" }. Nothing in the plugin pins or overrides hono.
    • The stale hono entry in our managed dependencies is entirely OpenClaw-injected (via the managed-peer-pin path, because our peer graph pulls hono transitively) and never pruned or reconciled against the advancing override.
    • Sibling plugins on the same machine confirm the pattern: openclaw-brave-plugin and openclaw-codex have no managedPeerDependencies block and carry hono in overrides only (4.12.21), never in dependencies — so they have nothing to drift, and they update fine. Only a plugin that triggers a managed peer pin for hono is exposed.

    Suggested fixes (either resolves it)

    1. Reconcile on sync (minimal). In syncManagedNpmRootPeerDependencies(), before Object.assign(overrides, managedOverrides), for any managed-override key that also exists in dependencies, align them — set the dependency pin to the override version (or drop the dependency pin so the override governs). Equivalently: never let a managed-peer pin and a managed override for the same package drift to different versions.
    2. Recompute peer pins from scratch (more robust). Treat managed-peer dependency pins as fully recomputed each install rather than preserved via the fallback. A fresh install already drops stale entries (empty previousManagedPeerDependencySet); making update behave the same way prevents the pin from ever going stale relative to the override.

    Separately: please consider not silently disabling a plugin on this specific npm error class without a clearly surfaced, one-command remediation. The current enabled=false behaviour makes a recoverable manifest-reconciliation issue look like the plugin simply stopped working.

    Suggested patch (pseudo-diff, against bundled npm-managed-root-*.js symbols)

     async function syncManagedNpmRootPeerDependencies(params) {
       // ...
       const overrides = readOverrideRecord(manifest.overrides);
       for (const key of readManagedOverrideKeys(manifest.openclaw)) delete overrides[key];
       Object.assign(overrides, managedOverrides);
    +
    +  // Reconcile: a managed override and a managed-peer pin for the same package
    +  // must never sit at different versions, or npm's assertRootOverrides rejects
    +  // the manifest (EOVERRIDE). Let the (always-current) override govern.
    +  for (const [packageName, overrideSpec] of Object.entries(managedOverrides)) {
    +    if (typeof overrideSpec !== "string") continue;
    +    if (Object.hasOwn(nextDependencies, packageName) &&
    +        nextDependencies[packageName] !== overrideSpec) {
    +      nextDependencies[packageName] = overrideSpec;
    +    }
    +  }
       // ...
     }

    Option 2 instead drops the dependencies[packageName] ?? preservation at :400 (and/or the fallbackPeerPins return at install-*.js:339) so peer pins are re-derived from the current resolution every time, keeping them aligned with the advancing override by construction.

    Happy to test a patched build against our managed project if useful — it's a clean repro (managed dependencies.hono at an older version than the bundled pnpm-workspace.yaml override).

  4. added
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    and removed
    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.
    on Jun 19, 2026
  5. locked as resolved and limited conversation to collaborators on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.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