Skip to content

fix(telegram): gracefully handle deleted reply targets#3858

Merged
teknium1 merged 2 commits intomainfrom
hermes/hermes-b2abefdf
Mar 30, 2026
Merged

fix(telegram): gracefully handle deleted reply targets#3858
teknium1 merged 2 commits intomainfrom
hermes/hermes-b2abefdf

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

When a user deletes their message while Hermes is processing, Telegram returns BadRequest: Message to be replied not found. Previously this was an unhandled permanent error causing silent delivery failure.

Now clears reply_to_id and retries, matching the existing "thread not found" recovery pattern already in the code.

Note: PR #3231 was written against a stale branch with a separate except clause. This fix integrates the handling into the existing BadRequest isinstance check block on current main (lines 748-765) for consistency.

Inspired by #3231 (@heathley identified the issue). Fixes #3229.

Clippy and others added 2 commits March 29, 2026 20:09
When a user deletes their message while Hermes is processing, Telegram
returns BadRequest 'Message to be replied not found'. Previously this
was an unhandled permanent error causing silent delivery failure.

Now clears reply_to_id and retries so the response is still delivered,
matching the existing 'thread not found' recovery pattern.

Inspired by PR #3231 by @heathley. Fixes #3229.
@teknium1 teknium1 merged commit b60cfd6 into main Mar 30, 2026
5 checks passed
itsXactlY pushed a commit to itsXactlY/hermes-agent that referenced this pull request Mar 30, 2026
…3858)

* fix: add gpt-5.4-mini to Codex fallback catalog

* fix(telegram): gracefully handle deleted reply targets

When a user deletes their message while Hermes is processing, Telegram
returns BadRequest 'Message to be replied not found'. Previously this
was an unhandled permanent error causing silent delivery failure.

Now clears reply_to_id and retries so the response is still delivered,
matching the existing 'thread not found' recovery pattern.

Inspired by PR NousResearch#3231 by @heathley. Fixes NousResearch#3229.

---------

Co-authored-by: Clippy <clippy@grads.flow>
Co-authored-by: Nigel Gibbs <heathley@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants