openclaw - 💡(How to fix) Fix [Bug]: @openclaw/codex peer link failure reproduced on 2026.5.19 after update

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

This appears to be the same failure mode as #78185, but reproduced after updating to OpenClaw 2026.5.19. The original issue is locked, so I am opening this as a current-version repro signal.

After updating 2026.5.18 -> 2026.5.19 on macOS/Homebrew, WebChat/Codex turns showed typing and then failed before any assistant reply. Gateway logs showed the Codex harness failing to import its shared-client bundle because it could not resolve the host openclaw package from the managed plugin npm tree.

Error Message

Error shape

Root Cause

After updating 2026.5.18 -> 2026.5.19 on macOS/Homebrew, WebChat/Codex turns showed typing and then failed before any assistant reply. Gateway logs showed the Codex harness failing to import its shared-client bundle because it could not resolve the host openclaw package from the managed plugin npm tree.

Fix Action

Fix / Workaround

Local mitigation

Code Example

Cannot find package 'openclaw' imported from ~/.openclaw/npm/node_modules/@openclaw/codex/dist/shared-client-*.js

---

OpenClaw: 2026.5.19 (a185ca2)
@openclaw/codex: 2026.5.19
Node: v22.22.0
OS/install style: macOS arm64, Homebrew global openclaw install, managed plugin tree under ~/.openclaw/npm
Default agent route: openai/gpt-5.5 with agentRuntime.id=codex

---

@openclaw/codex@2026.5.19
└── openclaw@2026.5.19 -> /opt/homebrew/lib/node_modules/openclaw

---

import ~/.openclaw/npm/node_modules/@openclaw/codex/dist/shared-client-*.js
# codex shared-client import ok
RAW_BUFFERClick to expand / collapse

Summary

This appears to be the same failure mode as #78185, but reproduced after updating to OpenClaw 2026.5.19. The original issue is locked, so I am opening this as a current-version repro signal.

After updating 2026.5.18 -> 2026.5.19 on macOS/Homebrew, WebChat/Codex turns showed typing and then failed before any assistant reply. Gateway logs showed the Codex harness failing to import its shared-client bundle because it could not resolve the host openclaw package from the managed plugin npm tree.

Error shape

Cannot find package 'openclaw' imported from ~/.openclaw/npm/node_modules/@openclaw/codex/dist/shared-client-*.js

The visible symptom was the same as #78185: user-visible channel activity starts, but the embedded Codex agent fails before reply.

Environment

OpenClaw: 2026.5.19 (a185ca2)
@openclaw/codex: 2026.5.19
Node: v22.22.0
OS/install style: macOS arm64, Homebrew global openclaw install, managed plugin tree under ~/.openclaw/npm
Default agent route: openai/gpt-5.5 with agentRuntime.id=codex

What repaired it

Running deep doctor/repair restored managed plugin peer links. After repair, the nested peer dependency resolution looked like this:

@openclaw/[email protected]
└── [email protected] -> /opt/homebrew/lib/node_modules/openclaw

The actual shared-client import then succeeded:

import ~/.openclaw/npm/node_modules/@openclaw/codex/dist/shared-client-*.js
# codex shared-client import ok

One subtlety: after repair, ~/.openclaw/npm/node_modules/openclaw was still not present as a top-level link. The working repaired state uses the nested per-plugin link at ~/.openclaw/npm/node_modules/@openclaw/codex/node_modules/openclaw.

Why this still seems upstream-relevant

@openclaw/codex still declares openclaw as an optional peer dependency, while the generated runtime bundle imports openclaw at startup. That means update/install/repair flows can leave the package manager in a state that looks aligned by version/package checks, while the Codex harness cannot actually start.

This reproduced on 2026.5.19, not only the originally reported 2026.5.4 environment in #78185.

Expected behavior

One of these should happen during update/plugin repair/startup:

  1. Ensure @openclaw/codex has a working nested or top-level openclaw peer link before any Codex turn can start.
  2. Treat missing Codex host peer resolution as a failed post-update/plugin health state.
  3. Surface the harness startup failure visibly instead of silently letting user-facing channels show typing/no response.

Local mitigation

I added a local post-update smoke check that directly imports @openclaw/codex/dist/shared-client-*.js, because broad Gateway/package/version checks were not enough to catch this failure before user-visible WebChat turns failed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

One of these should happen during update/plugin repair/startup:

  1. Ensure @openclaw/codex has a working nested or top-level openclaw peer link before any Codex turn can start.
  2. Treat missing Codex host peer resolution as a failed post-update/plugin health state.
  3. Surface the harness startup failure visibly instead of silently letting user-facing channels show typing/no response.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: @openclaw/codex peer link failure reproduced on 2026.5.19 after update