fix(slack): edit status bubbles in place instead of posting new ones - #68378
Closed
trac3r00 wants to merge 1 commit into
Closed
fix(slack): edit status bubbles in place instead of posting new ones#68378trac3r00 wants to merge 1 commit into
trac3r00 wants to merge 1 commit into
Conversation
Progress/status callbacks (context-pressure, compression retries,
model fallback) route through _send_or_update_status_coro, which
edits the previous bubble for the same status_key when the adapter
implements send_or_update_status — but only Telegram did. On Slack
every status event posted a fresh thread message, so a compression
retry loop spammed a dozen out-of-order bubbles into the thread
('Context too large 1/3... 2/3... 3/3', fallback switches, etc.).
Implement send_or_update_status on the Slack adapter following the
Telegram pattern (NousResearch#30045): first call posts and caches the message ts
per (channel, thread, status_key); subsequent calls edit that message
via chat.update. Edit failure drops the cached ts and falls back to a
fresh send. Cache is FIFO-bounded.
teknium1
added a commit
that referenced
this pull request
Jul 23, 2026
- rt.cms012@gmail.com -> trac3r00 (#68378; commit authored as 'Minseo-Choi' — trac3r00's display name, same account) - 15167896+2001Y@users.noreply.github.com -> 2001Y (#64267) - hello@jeromeiveson.com -> Trantor-develops (#57196) - boumagent@gmail.com -> patp (#18859) - dorukardahan@hotmail.com -> dorukardahan (#17184) was already mapped.
teknium1
added a commit
that referenced
this pull request
Jul 23, 2026
- rt.cms012@gmail.com -> trac3r00 (#68378; commit authored as 'Minseo-Choi' — trac3r00's display name, same account) - 15167896+2001Y@users.noreply.github.com -> 2001Y (#64267) - hello@jeromeiveson.com -> Trantor-develops (#57196) - boumagent@gmail.com -> patp (#18859) - dorukardahan@hotmail.com -> dorukardahan (#17184) was already mapped.
teknium1
added a commit
that referenced
this pull request
Jul 23, 2026
- rt.cms012@gmail.com -> trac3r00 (#68378; commit authored as 'Minseo-Choi' — trac3r00's display name, same account) - 15167896+2001Y@users.noreply.github.com -> 2001Y (#64267) - hello@jeromeiveson.com -> Trantor-develops (#57196) - boumagent@gmail.com -> patp (#18859) - dorukardahan@hotmail.com -> dorukardahan (#17184) was already mapped.
Contributor
|
Merged via #70189 — your commit was cherry-picked/reapplied onto current main with your authorship preserved in git history: your send_or_update_status edit-in-place mechanism was cherry-picked as the base. Thanks for the contribution! |
Contributor
Author
|
Thanks for carrying this into #70189 and preserving the original authorship. I verified the superseding PR is the landed path, so no further action is needed here. [bob] |
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
- rt.cms012@gmail.com -> trac3r00 (NousResearch#68378; commit authored as 'Minseo-Choi' — trac3r00's display name, same account) - 15167896+2001Y@users.noreply.github.com -> 2001Y (NousResearch#64267) - hello@jeromeiveson.com -> Trantor-develops (NousResearch#57196) - boumagent@gmail.com -> patp (NousResearch#18859) - dorukardahan@hotmail.com -> dorukardahan (NousResearch#17184) was already mapped.
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.
[Bob]
Symptom
During a compression/fallback retry loop, a Slack thread received a dozen separate, out-of-order status bubbles within ~3 minutes (live capture, 26-07-20):
Note the ordering: "(3/3)" arrives before "(2/3)" and "(1/3)" — each event is an independent async
chat.postMessage, so arrival order isn't delivery order, which makes the spam actively misleading on top of noisy.Root cause
gateway/run.py:515(_send_or_update_status_coro) already implements the right behavior — edit the previous bubble for the samestatus_key— but only when the adapter implementssend_or_update_status:Only the Telegram adapter implements it (#30045). Slack falls through to
adapter.send— one fresh thread message per status event.Fix
Implement
send_or_update_statuson the Slack adapter following the Telegram pattern:tskeyed by(channel, thread_ts, status_key)— thread-scoped, unlike Telegram's(chat_id, status_key), because a single Slack channel multiplexes many concurrent sessions as threads; a channel-scoped key would cross-edit status bubbles between unrelated threadsedit_message→chat.updatepath (finalize=False, so no Block Kit re-derivation per progress tick)cant_update_message, too old) drops the cached ts and falls back to a fresh send, re-caching the new tsNo gateway/core changes needed —
_send_or_update_status_coropicks the method up via the existinggetattrprobe, and the status cleanup path (_cleanup_msg_ids) is unaffected since it tracks whatevermessage_idthe adapter returns.Tests
tests/gateway/test_slack_status_update.py(5 tests):Existing Slack + Telegram gateway suites (263 tests) green on the branch.