# NousResearch/hermes-agent · Agent context-overflow stream recovery death spiral fix

## Open now

- Nothing open on GitHub.

A bug where partial-stream failures during context overflow caused recovery stubs to monotonically grow the context, making sessions unrecoverable. These issues and fixes address dropping or handling the partial fragment to break the repeating overflow cycle.

## TL;DR

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

- #106260: \[Bug\] Stream-failure recovery stubs grow the context monotonically; with protect_last_n covering the whole transcript the session becomes unrecoverable

## Prior & competing PRs

- **#106567: Context-overflow after partial streaming ends the turn instead of growing the request (#106260, salvage #106266)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/chat_completion_helpers.py`, `agent/turn_truncation.py`, `tests/run_agent/test_overflow_partial_terminal_106260.py`
- **#106264: fix(agent): drop partial-stream fragment on context-overflow to break the death spiral**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#106266`
- **#106275: fix(agent): stop overflowing partial stream recovery (#106260)**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `1b4207b84ef3178ada45af055954dea7ab16a78d`, `#106915`, `#106915`
- **#106569: fix(agent): context-overflow stream deaths no longer grow the next request into a death spiral (#106260, salvage #106266)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#106567`, `#106266`, `#106260`, `#106567`

## Fix status

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