OpenClaw 2026.4.12: The Subagent Cleanup Bug Explained
If you updated to openclaw@2026.4.12 and started seeing repeated warnings like
[warn] subagent cleanup finalize failed: ERR_MODULE_NOT_FOUND: Cannot find module subagent-registry.runtime.js โ
you're not alone. Here's exactly what's broken, how much it matters, and what to do.
What Happened
The 2026.4.12 npm publish accidentally omitted dist/subagent-registry.runtime.js
from the package. The bundled file dist/subagent-registry-CflSFWBm.js still
tries to dynamically import it, so every time a sub-agent finishes and OpenClaw attempts
cleanup/finalization, the import fails and logs a warning.
This is the third time in 2026 a missing lazy-runtime file has slipped into a published build โ GitHub issues #39586 (March 3.7) and #54790 (March 3.24) both followed the same pattern.
Does It Break Anything?
Partial impact only:
- โ Gateway keeps running โ the gateway itself is not affected
- โ Sub-agents still execute โ spawning and running sub-agents works
- โ ๏ธ Cleanup/finalization is incomplete โ sub-agent session records may not be fully cleaned up after completion
- โ ๏ธ Log spam โ repeated warnings clutter your logs, especially if you spawn many sub-agents
For most setups, this is an annoyance rather than a blocker. If you run heavy sub-agent orchestration (parallel Codex sessions, ACP harness flows), incomplete cleanup could slowly accumulate stale session state.
The Fix
Update to 2026.4.13 or 2026.4.14. The packaging fix was included in the 2026.4.14 release under "Packaging/plugins: localize bundled plugin runtime deps to their owning extensions" โ this is the umbrella fix that should prevent this class of issue going forward.
npm update -g openclaw
Verify your version after upgrading:
openclaw --version
Then restart the gateway:
openclaw gateway restart
Stuck on 4.12?
If you can't update right now (e.g., you're pinning versions for stability), you can suppress
the log noise by setting your log level to error in openclaw.json:
{
"logging": {
"level": "error"
}
}
This hides the warnings but does not fix the underlying incomplete cleanup. Update when you can.
Should You Pin Versions?
The recurring packaging regressions in 2026 (3.7, 3.24, 4.12) have made version pinning a reasonable strategy for production setups. If you're running OpenClaw for business operations and need stability, consider waiting 24-48 hours after a release before updating โ packaging bugs like this typically get reported within hours and patched in the next build.
See our guide on how to pin OpenClaw versions for a safe upgrade workflow.
Want someone to handle OpenClaw updates for you?
ClawReady's setup service includes update guidance and ongoing support so you're never surprised by a packaging regression on a Monday morning.
Book a Free Call โ