fix: support Slack thread targets in send_message - #24241
Closed
mzkarami wants to merge 1 commit into
Closed
Conversation
Parse optional Slack thread_ts suffixes in send_message targets and forward them to chat.postMessage as thread_ts so explicit Slack thread deliveries stay in the requested thread. Add unit coverage for Slack thread target parsing and dispatch.
Collaborator
Contributor
Author
|
Duplicate of #16992 (open since 2026-04-28, same fix) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chat_id:thread_tstargets insend_messagethread_tsto Slackchat.postMessageso explicit sends land in the requested threadProblem
send_messagedocumentsplatform:chat_id:thread_idstyle targets for threaded delivery, but Slack channel/DM IDs were previously parsed only as bareC...,G..., orD...IDs. A target like:could not preserve the Slack thread timestamp through
_parse_target_ref, so_send_to_platformhad nothread_idto pass to Slack. That makes explicit Slack thread delivery unreliable and can cause messages intended for a thread to be sent as normal channel messages instead.Solution
_SLACK_TARGET_REto accept an optional Slackthread_tssuffix_parse_target_reffor Slack targets_send_to_platforminto_send_slackthread_tsin the Slack Web API payload when presentthread_idin the success result for observabilityTests
git diff --check/home/dev/.hermes/hermes-agent/venv/bin/python -m pytest tests/tools/test_send_message_tool.py -qResult:
Warnings are dependency deprecation warnings from existing third-party packages.