# NousResearch/hermes-agent · Fixes for infinite context compaction loop bug

## Open now

- Nothing open on GitHub.

Multiple fixes and patches targeting an infinite loop condition in context compaction/compression, particularly triggered by low context length or token budget configurations. Includes anti-thrashing guards and tail budget protections.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 0 merged PR(s), 3 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_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

- #40803: \[Bug\]: Infinite Context Compaction Loop (messages=N->N) on low context_length / limit configurations

## Prior & competing PRs

- **#40813: fix(compressor): count no-op compressions toward anti-thrashing guard**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#40803`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#40888: fix(agent): break infinite context compaction loop when tail budget exceeds transcript (#40803)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#40803`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#40976: fix(agent): prevent infinite context compression loop with small windows**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#40803`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._

## Fix status

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