-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
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:
replyToMode- controls automatic threading viacreateSlackReplyReferencePlanner(respects"off")payload.replyToIdfromparseInlineDirectives- 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
- Configure Slack with default settings (no explicit
replyToMode, defaults to"off") - Send a message in a Slack channel
- 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")