# NousResearch/hermes-agent · Fix stale reasoning token counts in budget estimation

## Open now

- Nothing open on GitHub.

These members address a bug where \`_estimate_msg_budget_tokens\` incorrectly charges stale reasoning blocks against the tail budget, consuming 19–24% of the budget on blocks that are never replayed. The fix ensures actual, current reasoning token counts are used instead of stale values.

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

- #73624: \`_estimate_msg_budget_tokens\` charges stale reasoning to the compression tail budget — 19-24% of the budget spent on blocks no adapter replays

## Prior & competing PRs

- **#82116: fix(compression): charge stale thinking to the tail budget only on the newest assistant turn (#73624)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/context_compressor.py`, `tests/agent/test_replay_budget_accounting.py`
- **#73669: fix(agent): exclude stale reasoning from tail-budget walks**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `2516b3d7a806`, `#73624`, `#73669`, `#73730`, `#1`, `#15803`, `#14532`, `#6`, `#9`, `#374151`, `#4338`
- **#73730: fix(agent): use actual reasoning tokens in _estimate_msg_budget_tokens instead of stale**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#82116`, `#73624`

## Fix status

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