openclaw - 💡(How to fix) Fix fix(channels): registry-loader fallback to unstable getActivePluginRegistry() causes 'Outbound not configured' for Discord

Official PRs (…)
ON THIS PAGE

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…

Root Cause

Commit d7896ed4c9 (ci: retry release artifact downloads, 2026-05-20) rewrote src/channels/plugins/registry-loader.ts and re-introduced a fallback to getActivePluginRegistry() — the unstable active registry that gets replaced every time loadOpenClawPlugins() runs (config schema reads, plugin status queries, tool list loads, cron jobs, health-monitor checks, etc.).

Fix Action

Fix / Workaround

I have verified the fix locally by patching the compiled load-yRKrJeVQ.js in the npm-installed 2026.5.19-beta.2 package:

Patch: Remove the getActivePluginRegistry import and fallback, only use getActivePluginChannelRegistry:

Result: After patching + gateway restart, all 5 Discord bots (assistant, coder, default, researcher, writer) successfully receive AND reply to messages. No Outbound not configured errors.

Code Example

Outbound not configured for channel: discord

---

const channelRegistry = getActivePluginChannelRegistry();  // pinned (stable)
const channelValue = resolveFromRegistry(channelRegistry);
if (channelValue !== void 0) return channelValue;

// ↓ THIS IS THE BUG — fallback to unstable registry
const activeRegistry = getActivePluginRegistry();
if (activeRegistry && activeRegistry !== channelRegistry)
    return resolveFromRegistry(activeRegistry);

---

-import { a as getActivePluginRegistry, t as getActivePluginChannelRegistry } from "./runtime-OTX8N6Lz.js";
+import { t as getActivePluginChannelRegistry } from "./runtime-OTX8N6Lz.js";

 function createChannelRegistryLoader(resolveValue) {
   return async (id) => {
     const registry = getActivePluginChannelRegistry();
     const pluginEntry = registry?.channels.find(p => p.channelId === id);
     if (!pluginEntry) return void 0;
-    const activeRegistry = getActivePluginRegistry();
-    if (activeRegistry && activeRegistry !== registry) {
-      const activeEntry = activeRegistry?.channels.find(p => p.channelId === id);
-      if (activeEntry) return resolveValue(activeEntry);
-    }
     return resolveValue(pluginEntry);
   };
 }
RAW_BUFFERClick to expand / collapse

Bug Summary

After upgrading to 2026.5.19-beta.2, Discord bots can receive messages (inbound works, reactions added) but fail to reply (outbound delivery) with:

Outbound not configured for channel: discord

Root Cause

Commit d7896ed4c9 (ci: retry release artifact downloads, 2026-05-20) rewrote src/channels/plugins/registry-loader.ts and re-introduced a fallback to getActivePluginRegistry() — the unstable active registry that gets replaced every time loadOpenClawPlugins() runs (config schema reads, plugin status queries, tool list loads, cron jobs, health-monitor checks, etc.).

The buggy code in beta.2 compiled output (load-yRKrJeVQ.js):

const channelRegistry = getActivePluginChannelRegistry();  // pinned (stable)
const channelValue = resolveFromRegistry(channelRegistry);
if (channelValue !== void 0) return channelValue;

// ↓ THIS IS THE BUG — fallback to unstable registry
const activeRegistry = getActivePluginRegistry();
if (activeRegistry && activeRegistry !== channelRegistry)
    return resolveFromRegistry(activeRegistry);

The problem chain:

  1. getActivePluginChannelRegistry() internally does state.channel.registry ?? state.activeRegistry — if the pinned registry is null (not pinned yet, or released), it already returns the unstable one
  2. Even if pinned is set, the unstable getActivePluginRegistry() fallback can return a registry that was replaced mid-flight — one that lacks Discord's outbound adapter entry or only has it in "setup mode"
  3. Both lookups return undefinedOutbound not configured for channel: discord

Historical context

This was already fixed in commit bc9c074b2c (2026-03-26, fix(channels): use pinned channel registry for outbound adapter resolution), which removed the getActivePluginRegistry() fallback entirely. That commit was a correct fix. The release commit d7896ed4c9 silently reverted this fix.

Local Verification

I have verified the fix locally by patching the compiled load-yRKrJeVQ.js in the npm-installed 2026.5.19-beta.2 package:

Patch: Remove the getActivePluginRegistry import and fallback, only use getActivePluginChannelRegistry:

-import { a as getActivePluginRegistry, t as getActivePluginChannelRegistry } from "./runtime-OTX8N6Lz.js";
+import { t as getActivePluginChannelRegistry } from "./runtime-OTX8N6Lz.js";

 function createChannelRegistryLoader(resolveValue) {
   return async (id) => {
     const registry = getActivePluginChannelRegistry();
     const pluginEntry = registry?.channels.find(p => p.channelId === id);
     if (!pluginEntry) return void 0;
-    const activeRegistry = getActivePluginRegistry();
-    if (activeRegistry && activeRegistry !== registry) {
-      const activeEntry = activeRegistry?.channels.find(p => p.channelId === id);
-      if (activeEntry) return resolveValue(activeEntry);
-    }
     return resolveValue(pluginEntry);
   };
 }

Result: After patching + gateway restart, all 5 Discord bots (assistant, coder, default, researcher, writer) successfully receive AND reply to messages. No Outbound not configured errors.

Reproduction

  1. Install [email protected]
  2. Configure Discord channel with multiple bot accounts
  3. Start gateway, wait for plugins to fully load
  4. Wait for any background operation to trigger loadOpenClawPlugins() (cron job, health-monitor, tool list refresh)
  5. Send a Discord message → bot adds reaction (inbound works) but does not reply (outbound fails)

Environment

  • OpenClaw: 2026.5.19-beta.2 (947a070)
  • Node: 24.14.1
  • OS: Linux 6.8.0-106-generic
  • 5 Discord bot accounts configured

Suggested Fix

Revert the fallback in src/channels/plugins/registry-loader.ts — only use getActivePluginChannelRegistry() (pinned), same as commit bc9c074b2c did. The unstable getActivePluginRegistry() should never be used for outbound adapter resolution.

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…

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 fix(channels): registry-loader fallback to unstable getActivePluginRegistry() causes 'Outbound not configured' for Discord