# NousResearch/hermes-agent · WeCom WebSocket reconnection reliability and safety fixes

## Open now

- 4 issues, 3 PRs open on GitHub.
- #33287: WeCom adapter: connection degradation after May 15 gateway infrastructure changes
- #55491: WeCom _cleanup_ws should be defensive against internal exceptions
- #64512: \[Bug\] WeCom adapter: _cleanup_ws() exception-unsafe → permanent reconnect failure + silent loop death
- #64703: fix(wecom): _wait_for_handshake missing CLOSING state causes permanent reconnect failure after mass restart
- PR #55516: fix(wecom): guard _cleanup_ws against exceptions from resource close()
- PR #56463: fix(gateway): make WeCom _cleanup_ws defensive against partially-initialized adapters (#55491)
- PR #64716: fix(wecom): add CLOSING state to _wait_for_handshake terminal handler

This cluster focuses on bugs and fixes in the WeCom adapter's WebSocket connection lifecycle, specifically around exception-unsafe cleanup, missing connection states in handshake handling, silent reconnection failures, and insufficient retry logging.

## TL;DR

- 13 member(s): 4 open issue(s), 1 closed issue(s), 3 open PR(s), 0 merged PR(s), 5 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.12`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Open related issues

- #33287: WeCom adapter: connection degradation after May 15 gateway infrastructure changes
- #55491: WeCom _cleanup_ws should be defensive against internal exceptions
- #64512: \[Bug\] WeCom adapter: _cleanup_ws() exception-unsafe → permanent reconnect failure + silent loop death
- #64703: fix(wecom): _wait_for_handshake missing CLOSING state causes permanent reconnect failure after mass restart

## Closed / duplicate issues

- #47572: \[BUG\] WeCom adapter: WebSocket reconnection may fail silently without logging success or failure

## Prior & competing PRs

- **#47606: fix(wecom): bound reconnect attempts and log retries**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `f2a7adba5410cc1799e56fa77b47f84fcd9a2936`, `#47572`
- **#47622: fix(wecom): improve reconnection logging with attempt counts (#47572)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`
- **#55516: fix(wecom): guard _cleanup_ws against exceptions from resource close()**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `plugins/platforms/wecom/adapter.py`, `tests/gateway/test_wecom.py`
- **#56463: fix(gateway): make WeCom _cleanup_ws defensive against partially-initialized adapters (#55491)**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`
  - files: `gateway/platforms/wecom.py`, `tests/gateway/test_wecom.py`
- **#64678: fix(wecom): make _cleanup_ws() exception-safe to prevent permanent disconnect (#64512)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#64184`, `#64184`
- **#64716: fix(wecom): add CLOSING state to _wait_for_handshake terminal handler**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `67e57a15230e`, `#64703`, `#64716`, `#64707`, `#64716`, `#64716`, `#64727`, `#64716`, `#64707`, `#64727`, `#64716`, `#64716`, `#64716`, `#64707`, `#64727`, `#64716`, `#374151`, `#64703`, `#64707`, `#64716`, `#64727`
  - files: `plugins/platforms/wecom/adapter.py`, `tests/gateway/test_wecom.py`
- **#64727: fix(wecom): add CLOSING state to _wait_for_handshake auth guard (#64703)**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#64716`
- **#64729: fix(wecom): make _cleanup_ws exception-safe (#64512)**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#64678`

## Fix status

- No merged fix on record.
- Subsystem: `gateway`
