# NousResearch/hermes-agent · Account for output-token reservation in context compaction thresholds

## Open now

- 0 issues, 1 PR open on GitHub.
- PR #89777: fix(agent): converge output-cap retry to a workable max_tokens on first attempt

Most members concern the compaction/compression trigger not factoring in reserved output tokens, with one issue noting a custom-provider default max_tokens of 65536 reducing usable input budget. One member differs slightly, addressing output-cap retry convergence to a workable max_tokens, which is related but a distinct change.

## TL;DR

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

- #43547: Context compaction trigger ignores the output-token reservation (custom-provider default max_tokens=65536 halves the usable input budget)

## Prior & competing PRs

- **#50781: fix(compress): reserve output tokens in the compaction threshold (#23767, #43547)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/agent_init.py`, `agent/context_compressor.py`, `tests/agent/test_context_compressor.py`
- **#43651: fix(compress): account for output-token reservation in compaction threshold (#43547)**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `623b21bf2`, `#50781`, `#43547`, `#14690`
- **#45351: fix(agent): reserve output tokens in compression threshold**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#43651`
- **#89777: fix(agent): converge output-cap retry to a workable max_tokens on first attempt**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `agent/conversation_loop.py`

## Fix status

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