# NousResearch/hermes-agent · Fix quadratic cost when streaming large tool-call arguments

## Open now

- Nothing open on GitHub.

A bug was identified where streamed tool-call arguments were being rebuilt on every incoming chunk, causing O(n²) performance for large tool calls. These items address the problem by collecting chunks in a list and assembling them in linear time.

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

- #92207: \[Bug\]: streamed tool-call arguments are rebuilt on every chunk, so a big tool call costs the square of its size

## Prior & competing PRs

- **#101906: perf(agent): buffer streamed tool-call argument fragments and join once at materialisation (salvage #92217)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/chat_completion_helpers.py`, `tests/run_agent/test_streaming.py`
- **#92217: fix(agent): keep large streamed tool calls responsive**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#101906`
- **#92221: perf(agent): collect streamed tool-call arguments in a list**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#92217`
- **#92242: perf(agent): assemble streamed tool-call arguments in linear time**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#92217`

## Fix status

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