P2 Telegram Streaming Default Bypasses Global Kill Switch — streaming.enabled=false Isn't a Kill Switch (#53697)
Executive Summary
The default config ships with streaming.enabled: false (global master switch OFF) but also display.platforms.telegram.streaming: true (per-platform default ON). The runtime resolver in gateway/run.py (lines 14854, 16034) uses a logic pattern that bypasses the global kill switch entirely when a per-platform override exists. The global kill switch isn't a kill switch — it's a suggestion that the per-platform default silently overrides. This is the 6th distinct Telegram/gateway bug we've tracked.
Root Cause Analysis
The Faulty Resolution Logic
In gateway/run.py at two sites (lines 14854, 16034):
When _plat_streaming is True, this returns True without checking _scfg.enabled. The per-platform default bypasses the global kill switch entirely.
Expected vs Actual
| Global enabled | Platform override | Expected | Actual |
|---|---|---|---|
| false | true | false | true |
| false | false | false | false |
| false | unset | false | false |
| true | true | true | true |
Code-Level Reproduction
A self-contained Python snippet that imports from hermes_cli.config and gateway.config, mirrors the runtime resolution, and asserts effective_streaming is False. The assertion fails: runtime_effective_streaming=True.
Related but distinct from #6558 / PR #38921 (which addressed streaming.transport: off). This is about streaming.enabled: false still being bypassed.
Proposed Fix
Gate per-platform override behind global switch:
Reporter willing to submit PR.
Impact Assessment
| Dimension | Severity | Detail |
|---|---|---|
| Config Integrity | HIGH | Global kill switch is silently ignored — user thinks streaming is off, but Telegram messages stream anyway |
| Message Delivery | HIGH | Unwanted streaming can break message formatting on platforms that don't handle streaming well |
| Discovery | HIGH | User must read gateway source code or observe Telegram behavior to discover the bypass — config says one thing, runtime does another |
| Fix Complexity | LOW | One-line change: gate per-platform override behind global switch |
Telegram/Gateway Bug History (6 Distinct Issues)
| Issue | Severity | Description |
|---|---|---|
| #40691 | P2 | Polling-conflict freeze |
| #39525 | P2 | Dead after sleep/Wi-Fi |
| #44679 | P2 | Matrix DM regression |
| #50218 | P2 | Markdown table stripping |
| #51961 | P2 | Streaming final message broken |
| #53697 | P2 | Telegram streaming default bypasses global kill switch |
⚠️ Pattern: Six distinct Telegram/gateway bugs across polling, connectivity, cross-platform regression, formatting, streaming integrity, and config resolution. The gateway layer's per-platform override mechanism needs a systematic audit for config-bypass patterns.
Source Evidence
- GitHub Issue: #53697 — Telegram Streaming Default Bypasses Global Kill Switch
- Opened: June 27, 2026
- Reporter: @robsaye
- Labels: P2, bug, comp/gateway, platform/telegram, sweeper:risk-message-delivery, type/bug
- Hermes: v0.17.0 (190e1ffa) | OS: macOS 26.5.1 | Python: 3.11.15
📋 https://hermes-agent.reviews/hermes-telegram-streaming-bypass-global-killswitch-53697.html
Tracked by hermes-agent.reviews — June 27, 2026