hermes-agent/gateway/platforms
Teknium 41d9d08078
fix(telegram): fall back to no thread_id on 'Message thread not found' (#3390)
python-telegram-bot's BadRequest inherits from NetworkError, so the
send() retry loop was catching 'Message thread not found' as a transient
network error and retrying 3 times before silently failing. This killed
all tool progress messages, streaming responses, and typing indicators
when the incoming message carried an invalid message_thread_id.

Now detect BadRequest inside the NetworkError handler:
- 'thread not found' + thread_id set → clear thread_id and retry once
  (message still reaches the chat, just without topic threading)
- Other BadRequest errors → raise immediately (permanent, don't retry)
- True NetworkError → retry as before (transient)

252 silent failures in gateway.log traced to this on 2026-03-26.

5 new tests for thread fallback, non-thread BadRequest, no-thread sends,
network retry, and multi-chunk fallback.
2026-03-27 06:07:28 -07:00
..
__init__.py Enhance CLI with multi-platform messaging integration and configuration management 2026-02-02 19:01:51 -08:00
ADDING_A_PLATFORM.md docs: finish cron terminology cleanup 2026-03-14 19:20:58 -07:00
api_server.py fix: add explicit hermes-api-server toolset for API server platform (#3304) 2026-03-26 18:02:26 -07:00
base.py fix(gateway): add media download retry to Mattermost, Slack, and base cache (#3323) 2026-03-26 19:33:18 -07:00
dingtalk.py fix(dingtalk): requirements check passes with only one credential set 2026-03-17 03:50:45 -07:00
discord.py fix: validate empty user messages to prevent Anthropic API 400 errors (#3322) 2026-03-26 19:24:03 -07:00
email.py fix(gateway): add request timeouts to HA, Email, Mattermost, SMS adapters (#3258) 2026-03-26 14:36:07 -07:00
homeassistant.py fix(gateway): add request timeouts to HA, Email, Mattermost, SMS adapters (#3258) 2026-03-26 14:36:07 -07:00
matrix.py fix(matrix): add backoff for SyncError in sync loop (#3280) 2026-03-26 16:19:58 -07:00
mattermost.py fix(gateway): add media download retry to Mattermost, Slack, and base cache (#3323) 2026-03-26 19:33:18 -07:00
signal.py fix(signal): track SSE keepalive comments as connection activity (#3316) 2026-03-26 19:10:25 -07:00
slack.py fix(gateway): add media download retry to Mattermost, Slack, and base cache (#3323) 2026-03-26 19:33:18 -07:00
sms.py fix: store asyncio task references to prevent GC mid-execution (#3267) 2026-03-26 14:36:24 -07:00
telegram.py fix(telegram): fall back to no thread_id on 'Message thread not found' (#3390) 2026-03-27 06:07:28 -07:00
telegram_network.py feat(telegram): auto-discover fallback IPs via DoH when api.telegram.org is unreachable (#3376) 2026-03-27 04:03:13 -07:00
webhook.py fix: store asyncio task references to prevent GC mid-execution (#3267) 2026-03-26 14:36:24 -07:00
whatsapp.py fix: store asyncio task references to prevent GC mid-execution (#3267) 2026-03-26 14:36:24 -07:00