# NousResearch/hermes-agent · Preventing bot-to-bot reply loops in gateway and Mattermost

## Open now

- 0 issues, 1 PR open on GitHub.
- PR #151080: feat(gateway): add channel or thread scope for bot exchange chains

The three members all concern bots exchanging messages in endless loops, with one issue describing runtime notices being sent to bot peers and no way for a turn to stay silent. The two pull requests propose containing this, including limiting notices to bots and capping hops, though their outcomes aren't established here.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 1 open PR(s), 1 merged PR(s), 1 PR(s) closed without merging.
- A fix was merged to main in PR #148903. Verify it addresses your case.
- **Recommended:** read PR #148903 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-148903`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.50`: 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.

## Closed / duplicate issues

- #137027: Bot-to-bot DM ping-pong: runtime notices (busy-ack / redirect / model-fallback) are delivered to bot peers, and non-machinery turns can never be silent ⇒ no quiet state ⇒ unbounded loop

## Prior & competing PRs

- **#148903: fix(gateway): end bot-to-bot ping-pong: no runtime notices to bots, runtime hop cap, replies need no reply (salvage #137037)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/bot_chain.py`, `agent/compression_automation.py`, `agent/turn_author.py`, `agent/turn_context.py`, `gateway/authz_mixin.py`, `gateway/bot_loop_guard.py`, `gateway/bot_peer_notices.py`, `gateway/platforms/base.py`, `gateway/run_background.py`, `gateway/run_busy.py`, `gateway/run_inbound.py`, `gateway/run_notifications.py`, `gateway/run_turn.py`, `gateway/run_turn_hygiene.py`, `gateway/run_turn_persistence.py`, `gateway/run_turn_prepare.py`, `gateway/run_turn_progress.py`, `gateway/run_turn_runner.py`, `gateway/run_turn_runner_approval_settle.py`, `hermes_cli/config_defaults.py` (+16 more)
- **#137037: fix: contain Mattermost bot peer loops**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `4c466d86f2`, `#148903`
- **#151080: feat(gateway): add channel or thread scope for bot exchange chains**. open
  - maintainer direction: category `silent_close`; implication `active`
  - files: `cli-config.yaml.example`, `gateway/authz_mixin.py`, `gateway/bot_loop_guard.py`, `hermes_cli/config_defaults.py`, `hermes_cli/web_server_config.py`, `tests/gateway/test_bot_chain_scope.py`, `tests/hermes_cli/test_bot_chain_scope_config.py`, `website/docs/user-guide/messaging/index.md`, `website/docs/user-guide/messaging/telegram.md`

## Fix status

- Merged to main in PR #148903 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-11-05`.
- Subsystem: `gateway`
- Kind: `feature` (from the open PRs' GitHub type labels).
