Skip to content

fix(gateway): keep tool-progress edits alive after Telegram flood control (closes #25188)#28484

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-6063e704
May 19, 2026
Merged

fix(gateway): keep tool-progress edits alive after Telegram flood control (closes #25188)#28484
teknium1 merged 2 commits into
mainfrom
hermes/hermes-6063e704

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #25198 (@erhnysr).

Summary

When a tool-progress edit hits Telegram flood control (RetryAfter), can_edit was unconditionally set to False, permanently disabling progress message coalescing for the rest of the run. All subsequent tool updates were posted as separate new messages instead of updating the existing progress bubble.

Fix

Only set can_edit = False for non-recoverable edit errors. On flood control, back off by resetting _last_edit_ts so the existing throttle interval is respected before the next edit attempt. Coalescing resumes automatically after the backoff window.

Changes

  • gateway/run.py::send_progress_messages: scope can_edit = False to non-flood errors.

Validation

  • scripts/run_tests.sh tests/gateway/test_run_progress_topics.py tests/gateway/test_run_progress_interrupt.py -q → 28/28 passing.

Authorship preserved via cherry-pick. AUTHOR_MAP entry added in follow-up commit.

erhnysr and others added 2 commits May 18, 2026 21:57
…trol

When a progress-message edit hits Telegram flood control (RetryAfter),
can_edit was unconditionally set to False, permanently disabling coalescing
for the rest of the run. Subsequent tool updates were posted as separate
new messages instead of updating the existing progress bubble.

Fix: only set can_edit=False for non-recoverable edit errors. On flood
control, back off by resetting _last_edit_ts so the throttle interval is
respected before the next edit attempt.

Fixes #25188
@teknium1 teknium1 merged commit 32435df into main May 19, 2026
@teknium1 teknium1 deleted the hermes/hermes-6063e704 branch May 19, 2026 04:58
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-6063e704 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8880 on HEAD, 8880 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4651 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/telegram Telegram bot adapter labels May 19, 2026
@erhnysr

erhnysr commented May 19, 2026

Copy link
Copy Markdown
Contributor

Thanks for the clean merge @teknium1

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.

3 participants