Skip to content

fix(cli): load plugin registry for message/channels commands#1338

Merged
steipete merged 1 commit into
openclaw:mainfrom
MaudeCode:fix/message-command-plugins
Jan 21, 2026
Merged

fix(cli): load plugin registry for message/channels commands#1338
steipete merged 1 commit into
openclaw:mainfrom
MaudeCode:fix/message-command-plugins

Conversation

@MaudeBot

Copy link
Copy Markdown
Contributor

Summary

Fixes #1327 - clawdbot message --channel telegram fails with Unknown channel: telegram.

Problem

The Commander code path calls ensureConfigReady() in preAction but doesn't load the plugin registry. Channel plugins like Telegram are registered during plugin loading, so getChannelPlugin('telegram') returns undefined.

Solution

Add ensurePluginRegistryLoaded() call in preAction for commands that need channel plugin access:

  • message
  • channels
  • directory

Changes

const PLUGIN_REQUIRED_COMMANDS = new Set([
  'message',
  'channels', 
  'directory',
]);

// In preAction hook:
if (PLUGIN_REQUIRED_COMMANDS.has(commandPath[0])) {
  ensurePluginRegistryLoaded();
}

Testing

  • TypeScript compiles cleanly
  • Commands that don't need plugins remain fast (no plugin loading)
  • Commands that need plugins get them loaded before action runs

Fixes openclaw#1327 - 'clawdbot message --channel telegram' fails with
'Unknown channel: telegram' because plugins weren't loaded.

The Commander code path (non-route-first) calls ensureConfigReady() in
preAction but doesn't load the plugin registry. Channel plugins like
telegram are registered during plugin loading, so getChannelPlugin()
returns undefined without it.

This adds ensurePluginRegistryLoaded() call for commands that need
channel plugin access: message, channels, directory.
@steipete steipete self-assigned this Jan 20, 2026
@steipete steipete merged commit eff292e into openclaw:main Jan 21, 2026
16 of 22 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Landed after updating the PR branch + full gate run.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: c01bfcb\n- Merge commit: eff292e\n\nThanks @MaudeBot!

@kiliantyler kiliantyler deleted the fix/message-command-plugins branch January 21, 2026 01:57
dominicnunez pushed a commit to dominicnunez/openclaw that referenced this pull request Feb 26, 2026
dustin-olenslager pushed a commit to dustin-olenslager/ironclaw-supreme that referenced this pull request Mar 24, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…lugins

fix(cli): load plugin registry for message/channels commands
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
…lugins

fix(cli): load plugin registry for message/channels commands
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…lugins

fix(cli): load plugin registry for message/channels commands
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: clawdbot message --channel telegram fails with 'Unknown channel: telegram' (plugins not loaded in commander preAction)

2 participants