Summary
During an update from 2026.5.19 to 2026.5.20, the core package update succeeded, but the post-update plugin sync failed while installing the official @openclaw/codex plugin into the managed npm plugin root. This left the Codex harness unregistered and caused Codex-routed cron/channel sessions to fail.
This appears to be a managed npm-root/reify resilience issue rather than a bad @openclaw/codex@2026.5.20 tarball: after quarantining the existing ~/.openclaw/npm/node_modules tree and letting OpenClaw rebuild it, the same plugin installed successfully and openclaw plugins doctor reported no plugin issues.
Release involved: https://github.com/openclaw/openclaw/releases/tag/v2026.5.20
Environment
- macOS arm64
- OpenClaw before update:
2026.5.19 (a185ca2)
- OpenClaw after core update:
2026.5.20 (e510042)
which openclaw: /opt/homebrew/bin/openclaw
- OpenClaw root reported by update:
/opt/homebrew/lib/node_modules/openclaw
- Node from npm debug log:
v24.14.1
- npm from npm debug log:
11.11.0
- npm install cwd from debug log:
~/.openclaw/npm
- Active slots before update:
contextEngine=lossless-claw, memory=memory-lancedb
What happened
- Started on
2026.5.19.
- Ran:
openclaw update --tag 2026.5.20 --yes
- Core update completed successfully:
Update Result: OK
Root: /opt/homebrew/lib/node_modules/openclaw
Before: 2026.5.19
After: 2026.5.20
- Post-update plugin sync then failed while processing Codex:
Installing @openclaw/codex into /Users/allenhurff/.openclaw/npm...
Linked peerDependency "openclaw" -> /opt/homebrew/lib/node_modules/openclaw
Linked peerDependency "openclaw" -> /opt/homebrew/lib/node_modules/openclaw
Disabled "codex" after plugin update failure; OpenClaw will continue without it. Failed to update codex: npm install failed: npm error code ERR_INVALID_ARG_TYPE
npm error The "from" argument must be of type string. Received undefined
npm error A complete log of this run can be found in: /Users/allenhurff/.npm/_logs/2026-05-21T21_21_58_750Z-debug-0.log
- Subsequent attempts to manually repair with
openclaw plugins install @openclaw/codex --force failed the same way:
Installing @openclaw/codex into /Users/allenhurff/.openclaw/npm...
Downloading @openclaw/codex...
Extracting .../openclaw-codex-2026.5.20.tgz...
npm install failed: npm error code ERR_INVALID_ARG_TYPE
npm error The "from" argument must be of type string. Received undefined
Also not a valid hook pack: Error: package.json missing openclaw.hooks
The package.json missing openclaw.hooks line appears to be secondary/misleading fallback noise after the npm install failure.
Relevant npm debug stack
From the npm debug log:
verbose cwd /Users/allenhurff/.openclaw/npm
verbose node v24.14.1
verbose npm v11.11.0
verbose stack TypeError [ERR_INVALID_ARG_TYPE]: The "from" argument must be of type string. Received undefined
verbose stack at relative (node:path:1357:5)
verbose stack at /opt/homebrew/Cellar/node@24/24.14.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1184:21
verbose stack at Array.map (<anonymous>)
verbose stack at /opt/homebrew/Cellar/node@24/24.14.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1182:66
verbose stack at Array.map (<anonymous>)
verbose stack at [rollbackMoveBackRetiredUnchanged] (/opt/homebrew/Cellar/node@24/24.14.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1182:8)
verbose stack at #reifyPackages (/opt/homebrew/Cellar/node@24/24.14.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:315:31)
verbose stack at async Arborist.reify (/opt/homebrew/Cellar/node@24/24.14.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:121:5)
verbose stack at async Install.exec (/opt/homebrew/Cellar/node@24/24.14.1/lib/node_modules/npm/lib/commands/install.js:152:5)
verbose stack at async Npm.exec (/opt/homebrew/Cellar/node@24/24.14.1/lib/node_modules/npm/lib/npm.js:209:9)
The log also showed npm retiring/moving existing plugin packages in the shared managed root immediately before the crash, including packages under ~/.openclaw/npm/node_modules.
User-visible impact
After the failed post-update plugin sync, Codex was disabled/missing:
Plugin "codex" failed post-core payload smoke check (missing-package-dir): Install dir is missing: /Users/allenhurff/.openclaw/npm/node_modules/@openclaw/codex
Codex-routed work then failed with:
MissingAgentHarnessError: Requested agent harness "codex" is not registered.
A rollback attempt to 2026.5.19 also became confusing because the config had already been written by 2026.5.20, and the older binary refused gateway destructive/restart actions without OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1.
Recovery that worked
The successful recovery was to quarantine the entire managed npm node_modules tree and let OpenClaw rebuild it:
stamp=$(date +%Y%m%d-%H%M%S)
mkdir -p ~/.openclaw/manual-backups
tar -czf ~/.openclaw/manual-backups/${stamp}-openclaw-npm-before-repair.tgz -C ~/.openclaw npm
if [ -d "$HOME/.openclaw/npm/node_modules" ]; then
mv "$HOME/.openclaw/npm/node_modules" "$HOME/.openclaw/npm-node_modules.broken-$stamp"
fi
rm -f "$HOME/.openclaw/npm/package-lock.json" "$HOME/.openclaw/npm/npm-shrinkwrap.json"
openclaw plugins install @martian-engineering/lossless-claw@latest --force
openclaw plugins update acpx
openclaw plugins update memory-lancedb
openclaw plugins install @openclaw/codex --force
openclaw plugins update discord
openclaw plugins registry --refresh
openclaw plugins doctor
openclaw gateway restart --wait 45s
openclaw status --deep
After that:
Installed plugin: codex
No plugin issues detected.
Gateway reachable
Memory enabled (plugin memory-lancedb)
Expected behavior
openclaw update --tag 2026.5.20 --yes should not leave the configured Codex runtime/harness unavailable because npm's shared managed plugin root is in a bad state.
- If the managed npm root is corrupt or npm Arborist hits this rollback failure, OpenClaw should either:
- detect and quarantine/rebuild the managed npm plugin
node_modules tree automatically, or
- emit an explicit recovery command that rebuilds the managed npm root.
- The fallback
Also not a valid hook pack: package.json missing openclaw.hooks message should probably be suppressed or clarified when npm install has already failed for an npm plugin package.
- Downgrade/rollback guidance should account for the config
last written by newer version guard, since a failed post-update plugin sync can leave users with a newer config stamp but a broken runtime.
Why I think this is not simply a broken Codex tarball
The same @openclaw/codex@2026.5.20 package installed successfully after the shared managed npm root was rebuilt. The package metadata also appears to include normal OpenClaw plugin metadata (openclaw.runtimeExtensions, openclaw.install, peerDependencies.openclaw >=2026.5.20). The observed crash happens inside npm Arborist rollback while reifying the existing shared npm tree.
Summary
During an update from
2026.5.19to2026.5.20, the core package update succeeded, but the post-update plugin sync failed while installing the official@openclaw/codexplugin into the managed npm plugin root. This left the Codex harness unregistered and caused Codex-routed cron/channel sessions to fail.This appears to be a managed npm-root/reify resilience issue rather than a bad
@openclaw/codex@2026.5.20tarball: after quarantining the existing~/.openclaw/npm/node_modulestree and letting OpenClaw rebuild it, the same plugin installed successfully andopenclaw plugins doctorreported no plugin issues.Release involved: https://github.com/openclaw/openclaw/releases/tag/v2026.5.20
Environment
2026.5.19 (a185ca2)2026.5.20 (e510042)which openclaw:/opt/homebrew/bin/openclaw/opt/homebrew/lib/node_modules/openclawv24.14.111.11.0~/.openclaw/npmcontextEngine=lossless-claw,memory=memory-lancedbWhat happened
2026.5.19.openclaw plugins install @openclaw/codex --forcefailed the same way:The
package.json missing openclaw.hooksline appears to be secondary/misleading fallback noise after the npm install failure.Relevant npm debug stack
From the npm debug log:
The log also showed npm retiring/moving existing plugin packages in the shared managed root immediately before the crash, including packages under
~/.openclaw/npm/node_modules.User-visible impact
After the failed post-update plugin sync, Codex was disabled/missing:
Codex-routed work then failed with:
A rollback attempt to
2026.5.19also became confusing because the config had already been written by2026.5.20, and the older binary refused gateway destructive/restart actions withoutOPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1.Recovery that worked
The successful recovery was to quarantine the entire managed npm
node_modulestree and let OpenClaw rebuild it:After that:
Expected behavior
openclaw update --tag 2026.5.20 --yesshould not leave the configured Codex runtime/harness unavailable because npm's shared managed plugin root is in a bad state.node_modulestree automatically, orAlso not a valid hook pack: package.json missing openclaw.hooksmessage should probably be suppressed or clarified when npm install has already failed for an npm plugin package.last written by newer versionguard, since a failed post-update plugin sync can leave users with a newer config stamp but a broken runtime.Why I think this is not simply a broken Codex tarball
The same
@openclaw/codex@2026.5.20package installed successfully after the shared managed npm root was rebuilt. The package metadata also appears to include normal OpenClaw plugin metadata (openclaw.runtimeExtensions,openclaw.install,peerDependencies.openclaw >=2026.5.20). The observed crash happens inside npm Arborist rollback while reifying the existing shared npm tree.