Skip to content

fix(gateway): roll over telegram tool progress bubbles - #26242

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:hermes/fix-26207-telegram-progress-rollover
Closed

fix(gateway): roll over telegram tool progress bubbles#26242
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:hermes/fix-26207-telegram-progress-rollover

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes Telegram tool-progress rollover so long-running gateway turns stop editing a full progress bubble and continue from a fresh one before hitting Telegram's single-message limit. The gateway now also honors an adapter's returned replacement message_id after successful edits so follow-up updates keep targeting the newest visible progress message.

Related Issue

Fixes #26207

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Added platform-aware message-limit helpers in gateway/run.py for progress-bubble sizing.
  • Rolled over tool-progress bubbles before an edit would exceed the adapter message limit instead of replaying the full historical transcript into the same Telegram bubble.
  • Updated the progress loop to adopt replacement message_id values returned by edit_message().
  • Added a regression test in tests/gateway/test_run_progress_topics.py covering Telegram rollover behavior with a constrained message limit.

How to Test

  1. Run python3 -m pytest -o addopts='' tests/gateway/test_run_progress_topics.py.
  2. Confirm test_run_agent_telegram_progress_rolls_over_before_edit_overflow passes.
  3. In a Telegram gateway session with display.tool_progress: all, run a tool-heavy turn and verify progress opens a second bubble before the first one overflows.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15.5

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

  • python3 -m pytest -o addopts='' tests/gateway/test_run_progress_topics.py26 passed, 3 warnings in 27.89s

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/telegram Telegram bot adapter P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels May 15, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #26208 — same Telegram tool progress bubble rollover fix for #26207.

NishantEC

This comment was marked as outdated.

@teknium1

Copy link
Copy Markdown
Contributor

Closing in favor of #26208 — both fix the same bug (#26207, Telegram tool-progress bubbles exceeding the platform message limit). #26208 was submitted first, similar approach (rollover before limit), and similar diff scope. Functionally equivalent. Thanks for the parallel work.

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 duplicate This issue or pull request already exists 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 tool progress should roll over before message limit

4 participants