Bug Description
Two related issues with the WeChat (Weixin) platform integration in Hermes Gateway:
Issue 1: asyncio.timeout used outside task context
Error log:
[Weixin] send chunk failed to=o9cq808U attempt=1/3, retrying in 1.00s: Timeout context manager should be used inside a task
[Weixin] send chunk failed to=o9cq808U attempt=2/3, retrying in 2.00s: Timeout context manager should be used inside a task
[Weixin] send failed to=o9cq808U: Timeout context manager should be used inside a task
This error occurs when trying to send messages via WeChat. The asyncio.timeout() context manager is being used outside of an async task, which causes the error and prevents message delivery.
Issue 2: iLink session token expiration not handled gracefully
Error log:
[Weixin] Session expired; pausing for 10 minutes
When the iLink Bot API session/token expires, the system pauses for 10 minutes rather than attempting to re-authenticate or notify the user. The session expiration is not handled gracefully - users need to manually re-scan the QR code to re-authenticate.
Environment
- Hermes Agent v0.10.0 (2026.4.16)
- Python 3.11.15
- Platform: WeChat via iLink Bot API
Expected Behavior
- Fix the asyncio.timeout bug so messages can be sent successfully
- Handle iLink session expiration more gracefully (auto-retry re-authentication or user notification)
Bug Description
Two related issues with the WeChat (Weixin) platform integration in Hermes Gateway:
Issue 1: asyncio.timeout used outside task context
Error log:
This error occurs when trying to send messages via WeChat. The
asyncio.timeout()context manager is being used outside of an async task, which causes the error and prevents message delivery.Issue 2: iLink session token expiration not handled gracefully
Error log:
When the iLink Bot API session/token expires, the system pauses for 10 minutes rather than attempting to re-authenticate or notify the user. The session expiration is not handled gracefully - users need to manually re-scan the QR code to re-authenticate.
Environment
Expected Behavior