{"repo":"NousResearch/hermes-agent","public_id":"137027","display_label":"Preventing bot-to-bot reply loops in gateway and Mattermost","summary":"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.","subsystem":"gateway","kind":"feature","counts":{"members":4,"open_issues":0,"open_issues_distinct":0,"open_prs":1,"closed_issues":1,"merged_prs":1,"attempt_prs":2},"landed_fix":{"status":"merged_to_main","basis":"structural","pr":148903,"merged_at":"2026-11-05T05:01:11+00:00"},"resolution":{"state":"resolved","by":"pr-148903"},"freshness":{"state":"verified","last_verified_at":"2026-11-05T05:01:11+00:00","is_stale":false},"grouping":{"backbone":"STRUCTURAL_SPANNING","link_density":0.5},"fix_edges":[{"issue_number":136946,"pr_number":148903,"tier":"verified","basis":"superseded_ref","confidence":0.9,"recoverable_from_timeline":false,"pr_merged_at":"2026-11-05T05:01:11+00:00"},{"issue_number":137027,"pr_number":148903,"tier":"verified","basis":"closing_ref","confidence":0.95,"recoverable_from_timeline":true,"pr_merged_at":"2026-11-05T05:01:11+00:00"}],"members":[{"kind":"issue","number":137027,"title":"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","url":null,"state":"closed"},{"kind":"pr","number":137037,"title":"fix: contain Mattermost bot peer loops","url":null,"state":"closed","close_reason":{"refs":[{"kind":"commit","value":"4c466d86f2","number":0},{"kind":"pr","value":"#148903","number":148903}],"category":"implemented_elsewhere","implication":"superseded"},"merged":false},{"kind":"pr","number":148903,"title":"fix(gateway): end bot-to-bot ping-pong: no runtime notices to bots, runtime hop cap, replies need no reply (salvage #137037)","url":null,"state":"merged","close_reason":{"category":"merged"},"merged":true,"is_fix_pr":true,"fix_tier":"verified","files_changed":["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","plugins/platforms/mattermost/adapter.py","plugins/platforms/mattermost/gateway_env.py","plugins/platforms/qqbot/adapter.py","tests/agent/test_bot_chain.py","tests/gateway/test_bot_loop_guard_config.py","tests/gateway/test_bot_peer_runtime_notices.py","tests/gateway/test_bot_to_bot_chain.py","tests/gateway/test_busy_session_ack.py","tests/gateway/test_mattermost.py","tests/tools/test_bot_mode_dm_chain.py","tools/bot_mode_dm.py","tools/bot_mode_dm_chain.py","website/docs/user-guide/bot-mode.md","website/docs/user-guide/messaging/index.md","website/docs/user-guide/messaging/mattermost.md","website/docs/user-guide/messaging/telegram.md"]},{"kind":"pr","number":151080,"title":"feat(gateway): add channel or thread scope for bot exchange chains","url":null,"state":"open","close_reason":{"category":"silent_close","implication":"active"},"merged":false}],"trust":{"default_tier":"verified","includes_suggested":false}}