#19776: feat(telegram): send error/verbose replies silently (disable_notification)
channel: telegram
app: macos
size: S
Cluster:
Tool Execution and Error Handling
## Summary
When a reply has `isError=true`, pass `silent:true` through the delivery pipeline so Telegram sends it with `disable_notification`, avoiding notification sounds for tool error warnings and verbose output.
## Changes
- **bot-message-dispatch.ts**: pass `silent` flag based on `payload.isError`
- **bot/delivery.ts**: thread `silent` option through all send paths (`sendTelegramText`, `buildTelegramSendParams`, voice fallback)
- **Tests**: added for both dispatch and delivery layers
## Motivation
Tool error warnings (`⚠️ ... failed`) and verbose output trigger the same notification sound as regular messages, which is disruptive. These secondary messages should be sent silently.
Relates to #19711
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds `silent` (Telegram `disable_notification`) support for error/verbose replies in the Telegram delivery pipeline. When a reply has `isError=true`, the dispatch layer sets `silent: true`, which is threaded through `deliverReplies` → `sendTelegramText` / `buildTelegramSendParams` / voice fallback paths. Tests cover both the dispatch-layer flag mapping and the delivery-layer `disable_notification` output.
- One send path was missed: the `pendingFollowUpText` branch (media caption overflow, `delivery.ts:288`) does not pass `silent` to `sendTelegramText`, so follow-up text for media-with-long-caption error replies will still produce a notification.
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge with one minor missed send path that should be addressed.
- The change is straightforward feature plumbing — threading a boolean flag through existing send functions. The logic is correct across all paths except one (`pendingFollowUpText`). Tests are present for both layers. The missed path is an edge case (error reply with media whose caption overflows) that is unlikely to occur frequently but should still be fixed for completeness.
- src/telegram/bot/delivery.ts — the `pendingFollowUpText` send path at line 288 is missing the `silent` parameter.
<sub>Last reviewed commit: 0884c0f</sub>
<!-- 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
#19375: telegram: align tool-error summaries
by NorthyIE · 2026-02-17
77.7%
#11340: Telegram: skip empty message text instead of throwing (#11238)
by lailoo · 2026-02-07
77.1%
#17953: fix(telegram): prevent silent message loss and duplicate messages i...
by zuyan9 · 2026-02-16
76.8%
#12936: fix(telegram): omit message_thread_id for private DM chats
by omair445 · 2026-02-09
75.4%
#19648: fix: suppress silent-reply partial tokens during streaming
by bradleypriest · 2026-02-18
75.4%
#19800: fix(telegram): add INFO-level logging at inbound message drop paths
by katalabut · 2026-02-18
75.1%
#19576: fix: tighten isSilentReplyText to match whole-text only
by aldoeliacim · 2026-02-18
75.1%
#17769: fix(telegram): preserve reply text in threaded mode dispatch
by Glucksberg · 2026-02-16
75.0%
#19050: fix(telegram): skip message_thread_id for private chats to prevent ...
by Limitless2023 · 2026-02-17
74.9%
#7218: fix(telegram): skip empty text messages in threaded mode
by ArsalanShakil · 2026-02-02
74.5%