hermes - 💡(How to fix) Fix reply_in_thread: false does not prevent thread replies in Slack [1 pull requests]

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…

Root Cause

Root cause: Two independent issues:

Fix Action

Fixed

Code Example

thread_ts = event.get("thread_ts") or ts  # ts fallback for channels

---

thread_ts = assistant_thread.get("thread_ts") or event.get("thread_ts") or event.get("message_ts") or ""
RAW_BUFFERClick to expand / collapse

When reply_in_thread is set to false in the Slack platform config, the bot still replies in a thread instead of directly in the channel.

Steps to reproduce:

  1. Set gateway.slack.reply_in_thread: false in config.yaml
  2. Restart the gateway
  3. Send a top-level message in a channel (with the bot invited)
  4. Observe that the reply is posted in a thread

Root cause: Two independent issues:

  1. In _handle_slack_message, every top-level channel message gets its own message ts injected as a thread_id:
thread_ts = event.get("thread_ts") or ts  # ts fallback for channels

This synthetic thread_id is passed into the session source. When the gateway sends the reply, _resolve_thread_ts sees the thread_id in metadata and dutifully replies in that thread. The reply_in_thread: false check in _resolve_thread_ts only prevents the creation of new threads from reply_to; it still honors an existing thread_id.

  1. In _extract_assistant_thread_metadata, there was a spurious fallback:
thread_ts = assistant_thread.get("thread_ts") or event.get("thread_ts") or event.get("message_ts") or ""

message_ts on a top-level message is just the message's own timestamp, which compounds the issue.

Suggested fix:

  • Don't inject synthetic ts as thread_id when reply_in_thread is disabled.
  • Remove the message_ts fallback from _extract_assistant_thread_metadata.

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

hermes - 💡(How to fix) Fix reply_in_thread: false does not prevent thread replies in Slack [1 pull requests]