openclaw - ✅(Solved) Fix Plugin slash commands silently blocked on Slack despite capabilities.nativeCommands: true [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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…
GitHub stats
openclaw/openclaw#64577Fetched 2026-04-11 06:14:19
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Participants
Timeline (top)
cross-referenced ×1

Plugin-registered slash commands (e.g. /lcm, /lossless from lossless-claw) are silently excluded from Slack, even though:

  1. Slack declares capabilities.nativeCommands: true
  2. The user explicitly sets channels.slack.commands.native: true in config

The same commands work correctly on Telegram and Discord.

Root Cause

getPluginCommandSpecs() in src/plugins/command-registry-state.ts gates on nativeCommandsAutoEnabled, which Slack intentionally sets to false:

if (providerName && getChannelPlugin(providerName)?.commands?.nativeCommandsAutoEnabled !== true) {
  return [];
}

This is a double-gate: the Slack provider already checks resolveNativeCommandsEnabled() (which respects user config) before calling getPluginCommandSpecs("slack"). But getPluginCommandSpecs ignores the user's config and only checks the bundled plugin's nativeCommandsAutoEnabled flag.

Additionally, the Slack extension's slash.ts does not call getPluginCommandSpecs at all — so even if the gate were fixed, plugin commands would not be included in the native command list.

Fix Action

Fixed

PR fix notes

PR #64578: fix: allow plugin commands on Slack when channel supports native commands

Description (problem / solution / changelog)

Summary

  • Widen the getPluginCommandSpecs gate in command-registry-state.ts to also allow plugin commands when the channel declares capabilities.nativeCommands === true (not just nativeCommandsAutoEnabled)
  • Export getPluginCommandSpecs from plugin-sdk/command-auth so channel extensions can use it
  • Integrate getPluginCommandSpecs("slack") into the Slack extension's slash command setup, merging plugin commands into the native command list with dedup

Fixes #64577

Motivation

Slack sets nativeCommandsAutoEnabled: false but declares capabilities.nativeCommands: true. The old gate only checked the former, silently blocking all plugin-registered commands (like /lcm and /lossless from lossless-claw) on Slack. The same commands worked fine on Telegram and Discord which set nativeCommandsAutoEnabled: true.

Changes

FileChange
src/plugins/command-registry-state.tsWiden gate: allow when capabilities.nativeCommands is true
src/plugin-sdk/command-auth.tsExport getPluginCommandSpecs for channel extensions
extensions/slack/src/monitor/slash.tsImport and call getPluginCommandSpecs("slack"), merge into native commands
src/plugins/commands.test.tsUpdate test expectation: Slack now receives plugin commands

Test plan

  • Verified /lcm and /lossless work on Slack after the fix
  • Verified existing native Slack commands (/agentstatus, etc.) continue working
  • Verified Telegram and Discord behavior unchanged
  • Verified WhatsApp (no nativeCommands capability) still correctly omits plugin commands
  • Unit tests updated for new gate behavior

🦞 Generated with Claude Code

Changed files

  • docs/.generated/plugin-sdk-api-baseline.sha256 (modified, +2/-2)
  • extensions/slack/src/monitor/slash.ts (modified, +12/-0)
  • src/plugin-sdk/command-auth.ts (modified, +1/-0)
  • src/plugins/command-registry-state.ts (modified, +9/-5)
  • src/plugins/commands.test.ts (modified, +12/-1)

Code Example

if (providerName && getChannelPlugin(providerName)?.commands?.nativeCommandsAutoEnabled !== true) {
  return [];
}
RAW_BUFFERClick to expand / collapse

Description

Plugin-registered slash commands (e.g. /lcm, /lossless from lossless-claw) are silently excluded from Slack, even though:

  1. Slack declares capabilities.nativeCommands: true
  2. The user explicitly sets channels.slack.commands.native: true in config

The same commands work correctly on Telegram and Discord.

Root cause

getPluginCommandSpecs() in src/plugins/command-registry-state.ts gates on nativeCommandsAutoEnabled, which Slack intentionally sets to false:

if (providerName && getChannelPlugin(providerName)?.commands?.nativeCommandsAutoEnabled !== true) {
  return [];
}

This is a double-gate: the Slack provider already checks resolveNativeCommandsEnabled() (which respects user config) before calling getPluginCommandSpecs("slack"). But getPluginCommandSpecs ignores the user's config and only checks the bundled plugin's nativeCommandsAutoEnabled flag.

Additionally, the Slack extension's slash.ts does not call getPluginCommandSpecs at all — so even if the gate were fixed, plugin commands would not be included in the native command list.

Expected behavior

When a channel plugin declares capabilities.nativeCommands: true and the user enables native commands via config, plugin-registered commands should be included in the native command list for that channel.

Steps to reproduce

  1. Install a plugin that registers commands (e.g. lossless-claw with /lcm and /lossless)
  2. Configure Slack with commands.native: true
  3. Try /lcm or /lossless in Slack → nothing happens
  4. Try the same in Telegram → works correctly

Environment

  • OpenClaw version: 2026.4.9
  • Channel: Slack (socket mode)
  • Plugin: lossless-claw

extent analysis

TL;DR

Update the getPluginCommandSpecs() function to respect the user's config for native commands, allowing plugin-registered slash commands to work in Slack.

Guidance

  • Review the getPluginCommandSpecs() function in src/plugins/command-registry-state.ts to understand the current logic for gating native commands.
  • Modify the function to check the user's config (channels.slack.commands.native) in addition to the nativeCommandsAutoEnabled flag.
  • Ensure the Slack extension's slash.ts calls getPluginCommandSpecs to include plugin commands in the native command list.
  • Verify the fix by testing plugin-registered commands in Slack after updating the code.

Example

if (providerName && getChannelPlugin(providerName)?.commands?.nativeCommandsAutoEnabled !== true) {
  // Add a check for the user's config
  const userConfig = getConfig('channels.slack.commands.native');
  if (userConfig === true) {
    // Include plugin commands in the native command list
    return getPluginCommands();
  }
  return [];
}

Notes

The provided code snippet is a minimal example and may require additional modifications to work correctly. The fix should be tested thoroughly to ensure it works as expected.

Recommendation

Apply the workaround by updating the getPluginCommandSpecs() function to respect the user's config, as this will allow plugin-registered slash commands to work in Slack without requiring a full version upgrade.

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…

FAQ

Expected behavior

When a channel plugin declares capabilities.nativeCommands: true and the user enables native commands via config, plugin-registered commands should be included in the native command list for that channel.

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 - ✅(Solved) Fix Plugin slash commands silently blocked on Slack despite capabilities.nativeCommands: true [1 pull requests, 1 participants]