#13590: fix(slack): remove ack reaction after tool-only replies
channel: slack
stale
Cluster:
Slack Integration Enhancements
## Summary
Fix Slack ack cleanup for tool-only replies.
`removeAckReactionAfterReply` was gated behind `anyReplyDelivered`, but that flag only counted `queuedFinal`, `counts.block`, and `counts.final`.
When a reply path emits only tool replies (`counts.tool > 0`), the function returned early and skipped ack cleanup, leaving `:eyes:` stuck.
## Change
- Include `counts.tool` in `anyReplyDelivered` calculation in `src/slack/monitor/message-handler/dispatch.ts`.
## Why this matches observed behavior
- Ack appears, but does not remove when the response path is tool-driven (`message.send`-style flows), because cleanup never runs.
## Risk
Low: only broadens the existing cleanup gate to include already-delivered tool replies.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Broadened the cleanup gate to include tool-only replies by checking `counts.tool` in addition to `queuedFinal`, `counts.block`, and `counts.final`. Previously, when replies contained only tool results (no user-facing text/blocks), the ack reaction cleanup was skipped because `queuedFinal` was false and `counts.tool` was not checked.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The fix correctly addresses the reported issue by including tool-reply counts in the cleanup gate. The change is minimal, focused, and logically sound - it simply extends an existing condition to handle a previously missed case. The PR also includes minor formatting and import reordering improvements that align with the repository's code style.
- No files require special attention
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#2917: Slack: fix thread context + prevent reply spillover
by SocialNerd42069 · 2026-01-27
79.5%
#9520: fix: ignore slack already_reacted
by bolismauro · 2026-02-05
78.8%
#19632: fix: suppressToolErrors now suppresses exec tool failure notifications
by Gitjay11 · 2026-02-18
78.3%
#7719: fix(slack): thread replies with @mentions dropped in requireMention...
by SocialNerd42069 · 2026-02-03
77.8%
#15996: fix(agents): messages arrive out of order — tool output beats narra...
by yinghaosang · 2026-02-14
77.7%
#17316: fix: ack reaction not removed when block streaming is enabled (Tele...
by czmathew · 2026-02-15
77.5%
#20406: fix(slack): respect replyToMode when computing statusThreadTs in DMs
by QuinnYates · 2026-02-18
76.9%
#18187: fix: tool summaries silently dropped when reasoningLevel is stream
by ayanesakura · 2026-02-16
76.9%
#18466: fix: suppress recoverable mutating tool errors when agent already r...
by stijnhoste · 2026-02-16
76.5%
#23513: fix(slack): respect replyToMode=off for inline directive reply tags
by dorukardahan · 2026-02-22
76.1%