Summary
When a plugin directory is deleted manually (e.g. during a forced reinstall), openclaw doctor --fix correctly removes the stale entries from plugins.allow and plugins.entries, but does not clean up the corresponding channels.<plugin-id> entry. This leaves the config in an inconsistent state where a channel references a plugin that no longer exists.
Steps to Reproduce
- Install a channel plugin (e.g.
openclaw-weixin)
- Try to upgrade it:
openclaw plugins install @tencent-weixin/openclaw-weixin@2.1.8
- Install fails with
plugin already exists — manually delete the plugin directory: rm -rf ~/.openclaw/extensions/openclaw-weixin
- Run
openclaw doctor --fix --yes
- Doctor removes
plugins.allow: openclaw-weixin and plugins.entries.openclaw-weixin (stale), but leaves channels.openclaw-weixin intact
- Now run
openclaw plugins install @tencent-weixin/openclaw-weixin@2.1.8 — install succeeds
- Restart Gateway → Gateway fails to start with
Config validation failed: channels.openclaw-weixin: unknown channel id: openclaw-weixin
- With
KeepAlive: true in the LaunchAgent plist, launchd repeatedly restarts the Gateway, which repeatedly fails and exits — port is never released, leading to an EADDRINUSE boot loop
Root Cause
doctor --fix does not check channels.* for references to plugins that were removed from plugins.allow. The channel entry becomes a dangling reference that fails config validation at Gateway startup.
Expected Behavior
doctor --fix should either:
- Remove (or warn about)
channels.<id> entries when the corresponding plugin is no longer in plugins.allow, or
- Treat the channel entry as authoritative and restore the plugin to
plugins.allow instead of removing it
Environment
- OpenClaw: 2026.4.10
- OS: macOS 26.4 (arm64)
- Plugin:
@tencent-weixin/openclaw-weixin 2.1.7 → 2.1.8
- Gateway service: LaunchAgent with
KeepAlive: true
Workaround
Manually remove channels.<plugin-id> from openclaw.json before reinstalling the plugin, then restore it after install succeeds.
Summary
When a plugin directory is deleted manually (e.g. during a forced reinstall),
openclaw doctor --fixcorrectly removes the stale entries fromplugins.allowandplugins.entries, but does not clean up the correspondingchannels.<plugin-id>entry. This leaves the config in an inconsistent state where a channel references a plugin that no longer exists.Steps to Reproduce
openclaw-weixin)openclaw plugins install @tencent-weixin/openclaw-weixin@2.1.8plugin already exists— manually delete the plugin directory:rm -rf ~/.openclaw/extensions/openclaw-weixinopenclaw doctor --fix --yesplugins.allow: openclaw-weixinandplugins.entries.openclaw-weixin(stale), but leaveschannels.openclaw-weixinintactopenclaw plugins install @tencent-weixin/openclaw-weixin@2.1.8— install succeedsConfig validation failed: channels.openclaw-weixin: unknown channel id: openclaw-weixinKeepAlive: truein the LaunchAgent plist, launchd repeatedly restarts the Gateway, which repeatedly fails and exits — port is never released, leading to an EADDRINUSE boot loopRoot Cause
doctor --fixdoes not checkchannels.*for references to plugins that were removed fromplugins.allow. The channel entry becomes a dangling reference that fails config validation at Gateway startup.Expected Behavior
doctor --fixshould either:channels.<id>entries when the corresponding plugin is no longer inplugins.allow, orplugins.allowinstead of removing itEnvironment
@tencent-weixin/openclaw-weixin2.1.7 → 2.1.8KeepAlive: trueWorkaround
Manually remove
channels.<plugin-id>fromopenclaw.jsonbefore reinstalling the plugin, then restore it after install succeeds.