# NousResearch/hermes-agent · build_tool_preview max_len contract for small values

## Open now

- Nothing open on GitHub.

These issues and pull requests concern a bug where build_tool_preview() does not correctly respect the max_len parameter when the value is very small (under 4). Multiple fix attempts address capping or handling these edge-case inputs.

## TL;DR

- 5 member(s): 0 open issue(s), 1 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 #109134. Verify it addresses your case.
- **Recommended:** read PR #109134 (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-109134`. 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

- #9439: build_tool_preview() breaks max_len contract for values under 4

## Prior & competing PRs

- **#109134: Tool previews never exceed a tiny max_len of 1-3 (#9439, salvage #48483)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/display.py`, `tests/agent/test_display.py`
- **#9464: fix(agent): honor max_len in build_tool_preview for values <= 3 (#9439)**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `9d09598111`, `#109134`
- **#9477: fix(display): handle small max_len values in build_tool_preview()**. closed without merge
  - maintainer direction: category `stale_abandoned`; implication `active`
- **#9497: fix(display): cap tool previews for tiny max_len values**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `9d09598111`, `#109134`

## Fix status

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