Skip to content

fix(weixin): avoid cross-loop live session reuse - #13520

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/weixin-live-session-loop-13099
Closed

LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/weixin-live-session-loop-13099

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • only reuse the live Weixin adapter when its aiohttp send session belongs to the current event loop
  • fall back to a temporary session for sync bridges like send_message and cron delivery
  • add a regression test that covers the foreign-loop live adapter path

Closes #13099

Testing

  • pytest -o addopts='' tests/gateway/test_weixin.py

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/wecom WeCom / WeChat Work adapter labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

Related to #13350 and #12810 (same cross-loop reuse fix for Weixin). May supersede both — verify which should be merged.

1 similar comment
@alt-glitch

Copy link
Copy Markdown
Contributor

Related to #13350 and #12810 (same cross-loop reuse fix for Weixin). May supersede both — verify which should be merged.

@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the focused diagnosis and regression direction. This is already implemented on current main.

Automated hermes-sweeper review verified:

Closing as implemented on main.

@teknium1 teknium1 closed this Jul 12, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 12, 2026
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 platform/wecom WeCom / WeChat Work adapter sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: WeChat send_message causes "Timeout context manager should be used inside a task" error

3 participants