fix(slack): pass thread_ts through approval buttons and standalone sends - #9395
Closed
shivasymbl wants to merge 3 commits into
Closed
fix(slack): pass thread_ts through approval buttons and standalone sends#9395shivasymbl wants to merge 3 commits into
shivasymbl wants to merge 3 commits into
Conversation
houko
reviewed
Apr 14, 2026
houko
left a comment
Contributor
There was a problem hiding this comment.
Good fix — properly encoding thread_ts in button values to preserve thread routing is important. Backward compatibility with split logic is a nice touch. 👍
shivasymbl
force-pushed
the
fix/slack-thread-routing
branch
from
April 14, 2026 05:52
89fd387 to
9bf43b2
Compare
…sentinel detection Complete Slack interactivity overhaul: - Thread routing for approval buttons, update prompt, choice prompt - _send_slack() thread_id support for standalone deliveries - send_update_prompt() Yes/No Block Kit buttons - send_choice_prompt() generic multi-option prompt - _handle_cron_action_button() for hermes_action_* patterns - ---SLACK_BLOCKS--- sentinel detection in send() for cron job buttons - Block Kit markdown block type for rendering (format_message only for fallback) 6 files changed, 963 insertions(+), 26 deletions(-) Fixes NousResearch#9394 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
P1: Fix _handle_cron_action_button MessageEvent construction — use
_build_source() + proper MessageEvent fields instead of invalid
keyword args that caused TypeError on every button click.
P2: Add blocks array to _send_slack() — standalone sends now use
Block Kit markdown block type matching the gateway send() path.
P3: Sentinel detection only strips content after successful JSON
parse — prevents message corruption if normal content contains
the literal ---SLACK_BLOCKS--- string.
Also update 4 test assertions to expect raw markdown passthrough
(no longer pre-converted to mrkdwn before _send_slack).
204 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
shivasymbl
force-pushed
the
fix/slack-thread-routing
branch
from
April 14, 2026 15:24
9bf43b2 to
7115256
Compare
P1: _build_source → build_source (correct method name on BasePlatformAdapter)
P1: Remove _gateway_update_pending cleanup from _handle_update_action — the
pending map lives on GatewayRunner, not the adapter. The watcher clears
it when it reads the .update_response file.
P2: Remove undefined _progress_metadata from _watch_update_progress — the
variable exists in a different scope. Thread context is handled by
send_update_prompt internally.
204 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 tasks
Contributor
|
Thanks for the detailed Slack investigation. This is an automated hermes-sweeper review; the reported thread-routing behavior is now implemented on current main.
|
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
Thread-aware interactive buttons for all Slack user-input prompts. Responses stay in-thread instead of creating new top-level messages.
thread_idto_send_slack()— the only platform missing itthread_tsin approval button values for thread propagationsend_update_prompt()— Yes/No Block Kit buttons for Slack (was Discord/Telegram only)send_choice_prompt()— Generic multi-option prompt (up to 25 options)Changes
tools/send_message_tool.pythread_idto_send_slack(), forward from_send_to_platform()gateway/platforms/slack.py_encode/_decode_button_valuehelpers, thread_ts in approval buttons, newsend_update_prompt(), newsend_choice_prompt()with action handlersgateway/run.pysend_update_promptwith metadata for thread contexttests/gateway/test_slack_approval_buttons.pytests/tools/test_send_message_tool.py_send_slackthread_id tests5 files changed, 865 insertions(+), 10 deletions(-)
New capabilities
send_exec_approval()send_update_prompt()send_choice_prompt()_send_slack()send_choice_promptis fully generic — cron confirmations, routing decisions, model picks, topic selection:Test plan
:||) decode correctly — backward compatible_send_slackincludesthread_tswhen provided, omits whenNoneFixes #9394
🤖 Generated with Claude Code