Skip to content

doctor --fix removes stale plugin from plugins.allow/entries but leaves dangling channel reference, causing Gateway boot loop #65293

@yidecode

Description

@yidecode

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

  1. Install a channel plugin (e.g. openclaw-weixin)
  2. Try to upgrade it: openclaw plugins install @tencent-weixin/openclaw-weixin@2.1.8
  3. Install fails with plugin already exists — manually delete the plugin directory: rm -rf ~/.openclaw/extensions/openclaw-weixin
  4. Run openclaw doctor --fix --yes
  5. Doctor removes plugins.allow: openclaw-weixin and plugins.entries.openclaw-weixin (stale), but leaves channels.openclaw-weixin intact
  6. Now run openclaw plugins install @tencent-weixin/openclaw-weixin@2.1.8 — install succeeds
  7. Restart Gateway → Gateway fails to start with Config validation failed: channels.openclaw-weixin: unknown channel id: openclaw-weixin
  8. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions