# NousResearch/hermes-agent · Preflight compression skips sessions with few large messages

## Open now

- Nothing open on GitHub.

A bug where the preflight compression guard checks message count rather than token count, silently bypassing compression when sessions have few but very large messages that exceed the token threshold. Multiple fix attempts and duplicates are grouped here.

## TL;DR

- 6 member(s): 0 open issue(s), 2 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 #52114. Verify it addresses your case.
- **Recommended:** read PR #52114 (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: `partially_resolved` · deciding PR(s): `pr-52114`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.29`: 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

- #27404: \[Bug\] 预检压缩的消息数量守卫在 token 已超阈值时静默跳过
- #27405: Preflight compression guard bypasses token threshold, causing silent context overflow on sessions with few messages but large total tokens

## Prior & competing PRs

- **#27424: fix(agent): trigger preflight compression on token threshold for few huge messages (#27405)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
- **#52114: fix(agent): trigger preflight compression on few-but-huge sessions (#27405)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/turn_context.py`, `scripts/release.py`, `tests/agent/test_preflight_compression_gate.py`
- **#27435: fix(agent): trigger preflight compression on few-but-huge sessions**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `aacc6bb0a8117940b2f9279b07bf9124fb7cfe09`, `#27405`, `#27405`, `#52114`
- **#52058: fix(agent): trigger preflight compression on few-but-huge sessions (#27405)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#52114`, `#27405`

## Fix status

- Merged to main in PR #52114 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-06-24`.
- Subsystem: `agent`
