# NousResearch/hermes-agent · Streaming repetition loop detection and cutoff

## Open now

- Nothing open on GitHub.

These items concern a bug where repetition loops during streaming responses would not be detected or terminated until the stream finished. The fixes address cutting runaway repetition loops mid-stream, with and without callbacks.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #130551. Verify it addresses your case.
- **Recommended:** read PR #130551 (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-130551`. 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

- #127234: \[Bug\]: A streaming repetition loop never ends on an uncapped endpoint — every repetition check waits for the stream to finish

## Prior & competing PRs

- **#130551: fix(agent): a model stuck in a repetition loop no longer streams forever on an uncapped endpoint (#127234, salvage #127242)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/chat_completion_helpers.py`, `agent/repetition_guard.py`, `agent/turn_truncation.py`, `tests/agent/test_stream_runaway_repetition.py`, `website/docs/integrations/providers.md`, `website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/providers.md`
- **#127242: fix(agent): cut a runaway repetition loop while it streams, callback or not**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `53dcaecc960238d4d0461bd43e80465182cbd098`, `bc7f58f3b0270f62aafc9283f57887b25d560e9b`, `#127234`
- **#129709: fix(agent): end streaming repetition loops live at runaway scale (#127234)**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `77c373ac5f`, `#127234`, `#127242`, `#130551`

## Fix status

- Merged to main in PR #130551 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-10-01`.
