hermes - 💡(How to fix) Fix feat: update Telegram status messages instead of appending progress spam [2 pull requests]

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…

Root Cause

Behavior:

  • Persist/remember (chat_id, thread_id, status_key) -> message_id for bot-owned status messages.
  • First call sends a status message and stores the returned message_id.
  • Later calls use Telegram editMessageText to update the same message.
  • Fall back to send-new and update the stored mapping if the edit fails because the message was deleted, too old, not editable, or otherwise rejected.
  • Never edit user messages; only edit messages sent by this bot in the same chat/thread/topic.
  • Preserve existing send-new behavior for final artifacts, media attachments, and errors where a separate message is user-visible value.

Fix Action

Fixed

Code Example

send_or_update_status(chat_id, thread_id, status_key, text)

---

☐ scan sessions
☑ choose task
☑ create worktree
☐ run tests
RAW_BUFFERClick to expand / collapse

Problem

Telegram gateway/autopilot progress currently appends multiple status messages in a thread. For long tasks, cron runs, and autopilot loops this creates noisy chats and makes it hard to see current state.

Proposed implementation

Add a reusable Telegram status-progress API in Hermes gateway:

send_or_update_status(chat_id, thread_id, status_key, text)

Behavior:

  • Persist/remember (chat_id, thread_id, status_key) -> message_id for bot-owned status messages.
  • First call sends a status message and stores the returned message_id.
  • Later calls use Telegram editMessageText to update the same message.
  • Fall back to send-new and update the stored mapping if the edit fails because the message was deleted, too old, not editable, or otherwise rejected.
  • Never edit user messages; only edit messages sent by this bot in the same chat/thread/topic.
  • Preserve existing send-new behavior for final artifacts, media attachments, and errors where a separate message is user-visible value.

Wire todo/long-task/autopilot/cron progress through this API so one run updates one message:

☐ scan sessions
☑ choose task
☑ create worktree
☐ run tests

Cron/autopilot should update one message per run and do a final edit; only send a new message for final artifacts/errors.

Likely areas to inspect:

  • gateway/platforms/telegram.py
  • gateway stream/progress consumer code, likely gateway/stream_consumer.py or equivalent
  • cron delivery integration

Acceptance criteria

  • Telegram adapter exposes a tested send_or_update_status(chat_id, thread_id, status_key, text) path.
  • Status updates edit a prior bot message when possible.
  • Edit failures safely fall back to sending a new status message and refreshing the stored mapping.
  • Topic/thread isolation is preserved: same status_key in different thread IDs must not collide.
  • Final artifacts/errors still send new messages where appropriate.
  • Todo/long-task/autopilot/cron progress can emit checklist state through the API.
  • Unit tests cover first send, successful edit, edit failure fallback, and thread/status-key scoping.

Notes

This is a code feature, not config.

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 feat: update Telegram status messages instead of appending progress spam [2 pull requests]