fix: cool down transient Telegram typing failures#46355
Merged
Conversation
teknium1
marked this pull request as ready for review
June 15, 2026 00:08
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
unresolved-import |
1 |
invalid-assignment |
1 |
First entries
tests/gateway/test_telegram_typing_backoff.py:7: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`
✅ Fixed issues (2):
| Rule | Count |
|---|---|
unresolved-attribute |
2 |
First entries
run_agent.py:2920: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
Unchanged: 5733 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
Contributor
|
Verified ✅ — well-structured typing backoff with correct per-chat scoping. Reviewed the full diff (2 files + 1 test file, ~340 lines). What I checked:
|
teknium1
force-pushed
the
openclaw-port/telegram-typing-cooldown
branch
from
July 6, 2026 09:24
47010a7 to
a4fb69e
Compare
Port from openclaw/openclaw#93020: add per-chat cooldown for transient sendChatAction failures so keep-typing refreshes do not hammer Telegram during network blips or rate limits.
The Telegram adapter moved from gateway/platforms/telegram.py to plugins/platforms/telegram/adapter.py since this branch was created; point the test imports and monkeypatch targets at the new module.
teknium1
force-pushed
the
openclaw-port/telegram-typing-cooldown
branch
from
July 7, 2026 09:09
a4fb69e to
57a6a5d
Compare
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
* fix: cool down transient Telegram typing failures Port from openclaw/openclaw#93020: add per-chat cooldown for transient sendChatAction failures so keep-typing refreshes do not hammer Telegram during network blips or rate limits. * fix: support bare Telegram adapters in typing cooldown * test: update typing backoff imports for relocated Telegram adapter The Telegram adapter moved from gateway/platforms/telegram.py to plugins/platforms/telegram/adapter.py since this branch was created; point the test imports and monkeypatch targets at the new module.
justemu
pushed a commit
to justemu/hermes-agent
that referenced
this pull request
Jul 18, 2026
* fix: cool down transient Telegram typing failures Port from openclaw/openclaw#93020: add per-chat cooldown for transient sendChatAction failures so keep-typing refreshes do not hammer Telegram during network blips or rate limits. * fix: support bare Telegram adapters in typing cooldown * test: update typing backoff imports for relocated Telegram adapter The Telegram adapter moved from gateway/platforms/telegram.py to plugins/platforms/telegram/adapter.py since this branch was created; point the test imports and monkeypatch targets at the new module.
tangdaibin
pushed a commit
to tangdaibin/hermes-agent
that referenced
this pull request
Jul 20, 2026
* fix: cool down transient Telegram typing failures Port from openclaw/openclaw#93020: add per-chat cooldown for transient sendChatAction failures so keep-typing refreshes do not hammer Telegram during network blips or rate limits. * fix: support bare Telegram adapters in typing cooldown * test: update typing backoff imports for relocated Telegram adapter The Telegram adapter moved from gateway/platforms/telegram.py to plugins/platforms/telegram/adapter.py since this branch was created; point the test imports and monkeypatch targets at the new module.
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
* fix: cool down transient Telegram typing failures Port from openclaw/openclaw#93020: add per-chat cooldown for transient sendChatAction failures so keep-typing refreshes do not hammer Telegram during network blips or rate limits. * fix: support bare Telegram adapters in typing cooldown * test: update typing backoff imports for relocated Telegram adapter The Telegram adapter moved from gateway/platforms/telegram.py to plugins/platforms/telegram/adapter.py since this branch was created; point the test imports and monkeypatch targets at the new module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Telegram typing indicators now back off per chat after transient
sendChatActionfailures instead of retrying every keep-typing tick.Port from openclaw/openclaw#93020. OpenClaw added cooldown handling for transient Telegram typing-action failures; Hermes adapts that at the gateway adapter boundary with Python Telegram Bot semantics.
Changes
gateway/platforms/telegram.py: records per-chat cooldowns for network errors, 429/retry-after, and 5xx-ish failures; clears cooldowns on successful typing sends.tests/gateway/test_telegram_typing_backoff.py: covers cooldown entry, cooldown expiry/success clearing, DM-topic fallback, and non-transient thread failures.Validation
28 passedscripts/run_tests.sh tests/gateway/test_telegram_typing_backoff.py tests/gateway/test_keep_typing_timeout.py tests/gateway/test_telegram_approval_buttons.py→28 tests passedHERMES_HOME, realTelegramAdapter, mocked Bot API: transient failure suppressed second send; success after expiry cleared cooldownSource
Infographic