openclaw - 💡(How to fix) Fix Feature: Handle native Slack Slash Commands via Socket Mode [1 comments, 2 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#71665Fetched 2026-04-26 05:10:01
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1
  • OpenClaw version: 2026.4.23
  • Platform: Slack (Socket Mode, 17 independent App instances)
  • Verified: The manifest can be updated via apps.manifest.update to register Slash Commands, and the commands OAuth scope works. The only missing piece is the Socket Mode event handler in the Gateway runtime.
  • Source reference: SocketModeClient.js dispatches events by type, but slash_commands is not among the listened types in the OpenClaw provider code.

Root Cause

  1. If a user registers /reasoning, /think, /model, etc. as native Slack Slash Commands (which provides autocomplete and discoverability in Slack UI), Slack sends a slash_commands payload via Socket Mode.
  2. OpenClaw's Gateway has no handler for this event type — it never acknowledges the payload.
  3. Slack shows "failed because the app did not respond" after the 3-second timeout.

Fix Action

Fix / Workaround

The only workaround is to not register any Slash Commands in the manifest and rely on users sending commands as plain text messages. However, this loses the benefits of native Slack integration (autocomplete, usage hints, command discovery).

  • OpenClaw version: 2026.4.23
  • Platform: Slack (Socket Mode, 17 independent App instances)
  • Verified: The manifest can be updated via apps.manifest.update to register Slash Commands, and the commands OAuth scope works. The only missing piece is the Socket Mode event handler in the Gateway runtime.
  • Source reference: SocketModeClient.js dispatches events by type, but slash_commands is not among the listened types in the OpenClaw provider code.
RAW_BUFFERClick to expand / collapse

Feature Request: Handle Native Slack Slash Commands via Socket Mode

Problem

When Slash Commands are registered in a Slack App's manifest, Slack intercepts messages starting with / and routes them as slash_commands events through Socket Mode, instead of delivering them as regular text messages.

Currently, OpenClaw does not handle the slash_commands event type from Slack's Socket Mode. This means:

  1. If a user registers /reasoning, /think, /model, etc. as native Slack Slash Commands (which provides autocomplete and discoverability in Slack UI), Slack sends a slash_commands payload via Socket Mode.
  2. OpenClaw's Gateway has no handler for this event type — it never acknowledges the payload.
  3. Slack shows "failed because the app did not respond" after the 3-second timeout.

The only workaround is to not register any Slash Commands in the manifest and rely on users sending commands as plain text messages. However, this loses the benefits of native Slack integration (autocomplete, usage hints, command discovery).

Expected Behavior

OpenClaw should listen for slash_commands events on the Socket Mode connection and:

  1. Acknowledge the payload within 3 seconds (HTTP 200 equivalent via Socket Mode).
  2. Parse the command and text fields from the payload (e.g., command: "/reasoning", text: "off").
  3. Route the parsed command to the existing Gateway command handler (same as if the user had sent /reasoning off as a text message).
  4. Respond via the response_url or as a regular channel message, consistent with how text-based commands respond today.

Configuration

The existing config schema already has channels.slack.commands.native (bool or "auto") defined in config-schema-CH224TRD.js, but setting it to true or "auto" has no effect because no event handler exists in the runtime code.

Ideally:

  • commands.native: true — Register and handle all gateway commands as native Slash Commands
  • commands.native: "auto" — Auto-detect registered Slash Commands and handle them
  • commands.native: false (default) — Current behavior, text-only

Context

  • OpenClaw version: 2026.4.23
  • Platform: Slack (Socket Mode, 17 independent App instances)
  • Verified: The manifest can be updated via apps.manifest.update to register Slash Commands, and the commands OAuth scope works. The only missing piece is the Socket Mode event handler in the Gateway runtime.
  • Source reference: SocketModeClient.js dispatches events by type, but slash_commands is not among the listened types in the OpenClaw provider code.

Benefits

  • Discoverability: Users can type / in Slack and see available OpenClaw commands with descriptions and usage hints
  • Autocomplete: Slack shows parameter hints (e.g., /think [off|low|medium|high|xhigh])
  • Consistency: Aligns with how other Slack bots expose their functionality
  • No more conflicts: Commands like /help won't collide with other apps if properly namespaced

Note on /status

/status is a Slack built-in command and cannot be registered. This is a Slack platform limitation, not an OpenClaw issue.

extent analysis

TL;DR

Implement a Socket Mode event handler in OpenClaw's Gateway to acknowledge and parse slash_commands events.

Guidance

  • Add an event listener for slash_commands in SocketModeClient.js to handle the new event type.
  • Parse the command and text fields from the slash_commands payload and route the command to the existing Gateway command handler.
  • Respond to the slash_commands event within 3 seconds to avoid Slack's timeout error.
  • Update the config-schema-CH224TRD.js to utilize the commands.native configuration option to enable or disable native Slash Command handling.

Example

// SocketModeClient.js
// ...
switch (eventType) {
  // ...
  case 'slash_commands':
    const { command, text } = payload;
    // Route the command to the existing Gateway command handler
    handleCommand(command, text);
    break;
  // ...
}

Notes

The implementation should handle the slash_commands event type and integrate with the existing command handling logic. The commands.native configuration option should be used to control the behavior.

Recommendation

Apply a workaround by implementing the slash_commands event handler in the Gateway runtime code, as there is no clear indication of a fixed version available. This will allow OpenClaw to handle native Slack Slash Commands and provide a better user experience.

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 Feature: Handle native Slack Slash Commands via Socket Mode [1 comments, 2 participants]