← Back to PRs

#13590: fix(slack): remove ack reaction after tool-only replies

by alfongj-com open 2026-02-10 18:51 View on GitHub →
channel: slack stale
## 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