Skip to content

feat(slack): add reply_in_thread config option#2664

Closed
Mibayy wants to merge 1 commit into
NousResearch:mainfrom
Mibayy:feat/slack-reply-in-thread-config
Closed

feat(slack): add reply_in_thread config option#2664
Mibayy wants to merge 1 commit into
NousResearch:mainfrom
Mibayy:feat/slack-reply-in-thread-config

Conversation

@Mibayy

@Mibayy Mibayy commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Problem

When a Hermes agent on Slack replies to a channel message, it always creates a thread reply. Many teams prefer direct channel replies — thread replies bury the bot's response and require an extra click to see.

Solution

Add a reply_in_thread option (default true for backward compatibility) to the Slack platform config:

platforms:
  slack:
    extra:
      reply_in_thread: false

When false, _resolve_thread_ts() returns None for top-level channel messages, so replies go directly to the channel. Messages that originate inside an existing thread are still threaded (thread context is preserved).

Changes

  • Added a 4-line guard at the top of _resolve_thread_ts() in gateway/platforms/slack.py
  • Default is true — fully backward compatible, no behavior change unless explicitly configured

Closes #2662

When reply_in_thread is set to false in platforms.slack.extra, the bot
sends direct channel replies instead of always threading under the
original message.

Messages that originate inside an existing thread are still threaded
(preserves thread context). Top-level channel messages get direct
channel replies.

Default is true for full backward compatibility.

Example config:
  platforms:
    slack:
      extra:
        reply_in_thread: false

Closes NousResearch#2662
@teknium1

teknium1 commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Closing in favor of PR #2726 which has a more robust implementation (checks both thread_id and thread_ts for existing thread detection). Your PR was submitted first and identified the right fix — thank you for the contribution! Both PRs will be credited in the salvage merge.

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.

Add reply_in_thread config option for Slack platform

2 participants