Skip to content

Slack plugin: [[reply_to_current]] tags bypass replyToMode=off #16080

@Freemountaindeer

Description

@Freemountaindeer

Bug Description

When channels.slack.replyToMode is set to "off" (the default), agent responses containing [[reply_to_current]] tags still get sent as Slack thread replies instead of regular channel messages.

Expected Behavior

When replyToMode: "off", manual [[reply_to_current]] reply tags in agent output should be ignored (stripped but not acted upon), consistent with how the Telegram plugin handles this:

// Telegram plugin correctly checks replyToMode
const replyToId = replyToMode === "off" ? void 0 : resolveTelegramReplyId(reply.replyToId);

Actual Behavior

The Slack plugin uses payload.replyToId directly without checking replyToMode:

// Slack delivery path - no replyToMode check
const threadTs = payload.replyToId ?? params.replyThreadTs;

The replyToMode check only applies to replyThreadTs (via resolveSlackThreadTargets), but payload.replyToId from parsed reply tags takes priority and bypasses the check entirely.

Root Cause

Two independent mechanisms exist:

  1. replyToMode - controls automatic threading via createSlackReplyReferencePlanner (respects "off")
  2. payload.replyToId from parseInlineDirectives - parsed from [[reply_to_current]] tags in model output (does NOT respect "off")

Since the system prompt always injects a Reply Tags section instructing the model to "Prefer [[reply_to_current]]", all Slack channel responses now thread as replies even when replyToMode: "off".

Steps to Reproduce

  1. Configure Slack with default settings (no explicit replyToMode, defaults to "off")
  2. Send a message in a Slack channel
  3. Observe that the bot response is sent as a thread reply instead of a regular channel message

Suggested Fix

Add a replyToMode check in the Slack delivery path, similar to Telegram:

// In deliverReplies for Slack:
const threadTs = replyToMode === "off" 
  ? params.replyThreadTs  // Only use thread context from existing threads
  : (payload.replyToId ?? params.replyThreadTs);

Environment

  • OpenClaw version: 2026.2.12
  • Channel: Slack (Socket Mode)
  • Config: channels.slack.replyToMode not set (default "off")

Metadata

Metadata

Assignees

No one assigned

    Labels

    close:duplicateClosed as duplicatededupe:childDuplicate issue/PR child in dedupe cluster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions