Skip to content

fix(telegram): re-trigger typing indicator after sending messages#26036

Closed
alaamohanad169-ship-it wants to merge 1 commit into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/telegram-typing-keepalive-25836
Closed

fix(telegram): re-trigger typing indicator after sending messages#26036
alaamohanad169-ship-it wants to merge 1 commit into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/telegram-typing-keepalive-25836

Conversation

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor

Problem

Telegram clears the typing indicator when a new message is delivered. When the agent sends intermediate progress messages (like "Checking:"), the "...typing" bubble disappears immediately and doesn't return until the next keepalive tick (up to 2s later). This makes Hermes appear unresponsive during multi-tool operations.

Root Cause

The _keep_typing loop refreshes every 2 seconds, but when send() delivers a message, Telegram clears the typing state instantly. There's no immediate re-trigger, so the typing bubble stays dead until the next keepalive tick.

Fix

Call send_typing() immediately after successful message delivery in telegram.py:send(). This restarts the typing indicator without waiting for the next keepalive tick, keeping the "...typing" bubble visible throughout the agent's response.

Testing

  • Verified the fix follows the existing send_typing() pattern
  • Typing failures are caught and ignored (non-fatal), consistent with existing behavior
  • No changes to the keepalive loop needed

Fixes #25836

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter comp/gateway Gateway runner, session dispatch, delivery labels May 15, 2026
@alaamohanad169-ship-it alaamohanad169-ship-it force-pushed the fix/telegram-typing-keepalive-25836 branch from 9a446cf to d1cbf09 Compare May 16, 2026 18:53
Telegram clears the typing state when a new message is delivered.
When the agent sends intermediate progress messages (like 'Checking:'),
the '...typing' bubble disappears immediately and doesn't return until
the next keepalive tick (up to 2s later). This makes Hermes appear
unresponsive during multi-tool operations.

Fix: call send_typing() immediately after successful message delivery
to restart the typing indicator without waiting for the next keepalive tick.

Fixes NousResearch#25836
@alaamohanad169-ship-it alaamohanad169-ship-it force-pushed the fix/telegram-typing-keepalive-25836 branch from d1cbf09 to 6d23750 Compare May 16, 2026 19:20
@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor Author

Hi! Just checking in — this PR is rebased on the latest main and all checks are passing. Happy to address any feedback. Thanks for your time!

teknium1 added a commit that referenced this pull request May 17, 2026
…tors

Adds release-note attribution mappings for the contributors from group 5:
- @haran2001 (PR #27070, #27068)
- @ms-alan (PR #26443)
- @godlin-gh (PR #26118)
- @wesleysimplicio (PR #25777, ext-email form)
- @Carry00 (PR #26851)
- @alaamohanad169-ship-it (PR #26036)
- @hawknewton (PR #26294)

(YanzhongSu PR #25879 and flamiinngo PR #27231 already mapped.)
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #27382 — your commit was cherry-picked onto current main as part of a batch salvage of low-risk new-contributor PRs. Authorship preserved (fix(telegram): re-trigger typing indicator after sending messages). Thanks for the contribution.

@teknium1 teknium1 closed this May 17, 2026
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
@alaamohanad169-ship-it alaamohanad169-ship-it deleted the fix/telegram-typing-keepalive-25836 branch June 6, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telegram typing indicator drops mid-response, especially when message ends with colon

3 participants