Skip to content

fix(config): bridge reply_in_thread to platform extra dict - #7561

Closed
Linux2010 wants to merge 1 commit into
NousResearch:mainfrom
Linux2010:fix/issue-7532-slack-reply-in-thread-config
Closed

fix(config): bridge reply_in_thread to platform extra dict#7561
Linux2010 wants to merge 1 commit into
NousResearch:mainfrom
Linux2010:fix/issue-7532-slack-reply-in-thread-config

Conversation

@Linux2010

Copy link
Copy Markdown
Contributor

What broke

Setting slack.reply_in_thread: false in config.yaml has no effect. Slack DM replies are always threaded regardless of this setting.

Root cause

In gateway/config.py, the slack config section bridges several keys to platform extra (require_mention, allow_bots, free_response_channels), but reply_in_thread was missing from this bridging logic.

As a result, self.config.extra.get("reply_in_thread", True) in slack.py always returned the default True.

Why this fix is minimal

  • Added 2 lines to bridging logic in gateway/config.py
  • Added reply_in_thread to the list of bridged keys
  • Works for all platforms (Slack, Discord, Telegram, etc.)

What I tested

Added test suite tests/gateway/test_reply_in_thread_config.py with 8 test cases:

Test Coverage
test_slack_reply_in_thread_false_bridged Slack false → extra
test_slack_reply_in_thread_true_bridged Slack true → extra
test_slack_reply_in_thread_default_true Default behavior
test_discord_reply_in_thread_bridged Discord bridging
test_telegram_reply_in_thread_bridged Telegram bridging
test_multiple_platforms_reply_in_thread Multiple platforms
test_reply_in_thread_with_require_mention Combined with require_mention
test_reply_in_thread_with_free_response_channels Combined with free_response_channels

What I intentionally did not change

  • No changes to slack.py behavior
  • No changes to other platform adapters
  • No opportunistic refactoring

Fixes #7532

## What broke
Setting `slack.reply_in_thread: false` in config.yaml has no effect.
Slack DM replies are always threaded regardless of this setting.

## Root cause
In gateway/config.py, the slack config section bridges several keys
to platform extra (require_mention, allow_bots, free_response_channels),
but `reply_in_thread` was missing from this bridging logic.

As a result, `self.config.extra.get("reply_in_thread", True)` in
slack.py always returned the default `True`.

## Why this fix is minimal
- Added 2 lines to bridging logic in gateway/config.py
- Added reply_in_thread to the list of bridged keys
- Works for all platforms (Slack, Discord, Telegram, etc.)

## What I tested
Added test suite with 8 test cases:
- test_slack_reply_in_thread_false_bridged
- test_slack_reply_in_thread_true_bridged
- test_slack_reply_in_thread_default_true
- test_discord_reply_in_thread_bridged
- test_telegram_reply_in_thread_bridged
- test_multiple_platforms_reply_in_thread
- test_reply_in_thread_with_require_mention
- test_reply_in_thread_with_free_response_channels

## What I intentionally did not change
- No changes to slack.py behavior
- No changes to other platform adapters
- No opportunistic refactoring

Fixes NousResearch#7532
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the precise diagnosis and clean fix, @Linux2010! This exact change was independently landed on main four days after your PR opened.

Automated hermes-sweeper review — closing as already implemented on main.

  • The identical two-line bridge for reply_in_thread was added by commit b1be86ef9 (fix(gateway): bridge slack.reply_in_thread config) on 2026-04-15.
  • Current gateway/config.py lines 573–574 already contain the exact patch this PR proposes.
  • gateway/platforms/slack.py line 672 confirms the consumer reads self.config.extra.get('reply_in_thread', True), so the bridging fix is effective.

The underlying issue #7532 is resolved. No further action needed on this PR.

@teknium1 teknium1 closed this Apr 27, 2026
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.

[Bug]: slack.reply_in_thread config option not applied to platform extra dict

2 participants