← Back to PRs

#14216: fix(messaging): check both pipeline and direct keys for reply deduping

by F1xTrack open 2026-02-11 18:09 View on GitHub →
agents stale
## Summary - Ensures that payloads are correctly deduped by checking both the block streaming pipeline AND the direct sent block keys. - This prevents double-sending payloads when the pipeline is created late or intermittent. Co-authored-by: F1xTrack <1993961048@qq.com> <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> The change updates reply payload deduplication to drop any final payloads that have already been sent either via the block streaming pipeline (`blockReplyPipeline.hasSentPayload`) or directly during tool flush (`directlySentBlockKeys`). This addresses cases where the pipeline may be created late or intermittently, so relying on only one mechanism could double-send replies. <h3>Confidence Score: 4/5</h3> - This PR is likely safe to merge; it makes a focused deduplication change with low behavioral surface area. - The only code change in the head commit is a localized filter predicate in `buildReplyPayloads`, and the logic is straightforward (exclude if sent via either pathway). Remaining risk is whether `hasSentPayload` and `createBlockReplyPayloadKey` are consistent for all payload shapes, but the change is additive to existing dedupe and should reduce duplicates rather than introduce them. - src/auto-reply/reply/agent-runner-payloads.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs