hermes - 💡(How to fix) Fix typing indicator de Telegram ("escribiendo...")

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Workaround

Script externo Typing Resurrector que corre vía cron y mantiene el typing indicator vivo independientemente. Creado por @thl-corporation y @thl-corporation-spa.

RAW_BUFFERClick to expand / collapse

Descripción

El typing indicator de Telegram ("escribiendo...") aparece SOLO en el primer mensaje después de iniciar el gateway. Después del primer mensaje, NUNCA vuelve a aparecer, ni para mensajes nuevos.

Causa raíz

El flag self._typing_stopped en gateway/platforms/telegram.py (línea 454) se pone True cuando stop_typing() es llamado (después de cada respuesta en gateway/run.py línea 8821), pero nunca se resetea a False. Esto mata permanentemente el typing indicator.

Una vez _typing_stopped = True:

  • send_typing() (línea 4140) hace short-circuit: if self._typing_stopped: return
  • El re-trigger en send() (línea 2046) también falla
  • Los follow-up typing (línea 18057) también son silenciosamente bloqueados

Código afectado

telegram.py:

  • Línea 454: self._typing_stopped: bool = False — init
  • Línea 4140: if self._typing_stopped: return — short-circuit
  • Línea 4175-4183: stop_typing() — setea True, nunca resetea

run.py:

  • Línea 8821: await _typing_adapter.stop_typing(source.chat_id) — llamado post-respuesta
  • Línea 18057: follow-up typing — bloqueado por el flag

Issue secundario

_keep_typing_loop solo existe en _run_agent_via_proxy() (modo proxy). En modo local (AIAgent, default) no hay loop de typing persistente.

Fix sugerido

Resetear _typing_stopped = False antes de cada nuevo mensaje, o eliminarlo completamente y usar el mecanismo _typing_stop_event que ya existe en base.py.

Workaround

Script externo Typing Resurrector que corre vía cron y mantiene el typing indicator vivo independientemente. Creado por @thl-corporation y @thl-corporation-spa.

Evidencia

Testeado en Hermes Agent v0.15+. sendChatAction funciona correctamente via API directa — el bug es puramente del flag _typing_stopped.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix typing indicator de Telegram ("escribiendo...")