# NousResearch/hermes-agent · Kimi reasoning token double-counting and compression bugs

## Open now

- Nothing open on GitHub.

These items address two related issues with Kimi model handling: reasoning/reasoning_content fields being charged twice in token estimates, and chat histories incorrectly triggering premature compression. The bug report documents the combined ~2.5x estimate inflation and missing replay of reasoning content on the wire.

## 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 #98998. Verify it addresses your case.
- **Recommended:** read PR #98998 (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: `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

- #81481: \[Bug\]: reasoning/reasoning_content double-charged on every historical turn, neither replayed on kimi chat/completions wire — residual ~2.5x estimate inflation after #75884

## Prior & competing PRs

- **#98998: fix(compression): compaction dead-loop ended — trigger and tail walks charge stale thinking by wire truth (#84371)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/context_compressor.py`, `agent/conversation_compression.py`, `agent/conversation_loop.py`, `agent/message_sanitization.py`, `agent/model_metadata.py`, `agent/turn_context.py`, `tests/agent/test_estimator_parity_84371.py`
- **#81504: fix(compression): stop Kimi histories from triggering premature compression**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `26f178e5fa`, `452f6b7de2`, `64cc87e668`, `#98998`, `#81481`, `#92690`
- **#81509: fix(estimator): charge duplicate reasoning fields once in token estimates**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#81504`

## Fix status

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