# NousResearch/hermes-agent · Gemini parallel tool call streaming parse bugs

## Open now

- 1 issue, 1 PR open on GitHub.
- #62937: \[Bug\]: Gemini (OpenAI-compat) parallel tool calls are concatenated into one tool_calls entry → arguments dropped as {}
- PR #63015: fix(agent): split concatenated tool_call args in streaming assembler

Multiple bug reports and fix attempts addressing how Gemini's OpenAI-compatible and native endpoints emit parallel tool calls as concatenated or merged JSON during streaming, causing arguments to be dropped or misassigned. Includes related work to route Gemini through the native AI Studio API.

## TL;DR

- 13 member(s): 1 open issue(s), 4 closed issue(s), 1 open PR(s), 0 merged PR(s), 7 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## 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_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.16`: 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.

## Open related issues

- #62937: \[Bug\]: Gemini (OpenAI-compat) parallel tool calls are concatenated into one tool_calls entry → arguments dropped as {}

## Closed / duplicate issues

- #25333: run_agent: 'Unrepairable tool_call arguments' when Gemini-3-Flash-Preview emits parallel tool calls as }{ — JSON parser drops them
- #33402: \[Bug\]: stream parser fails to lex parallel tool-calls emitted as concatenated JSON (Gemini 3.5)
- #57939: Gemini streaming: distinct parallel calls to the same tool are merged into one tool call (misreported as "Response truncated due to output length limit")
- #62940: Gemini (OpenAI-compat) parallel tool calls are concatenated into one tool_calls entry → arguments dropped as {}

## Prior & competing PRs

- **#25346: fix(run_agent): split concatenated streamed tool-call args**. closed without merge
  - maintainer direction: category `wontfix_bydesign`; implication `wontfix`; refs `0430e71ec971d673a6d2a32fd54c1847683a16d2`, `#25333`, `#25346`
- **#25347: fix(agent): repair concatenated JSON tool_call arguments from Gemini parallel calls**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#25346`
- **#26053: fix(run_agent): recover first object from concatenated tool_call args (#25333)**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#26053`, `#25347`, `#25346`, `#25333`, `#5`
- **#36039: fix(run_agent): split concatenated streamed tool-call args (#25333)**. closed without merge
  - maintainer direction: category `wontfix_bydesign`; implication `wontfix`; refs `#45835`
- **#57941: fix(gemini): do not merge distinct parallel calls to the same tool in streaming**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#24676`, `#54355`, `#57165`, `#57939`
- **#63015: fix(agent): split concatenated tool_call args in streaming assembler**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `agent/chat_completion_helpers.py`, `agent/message_sanitization.py`, `run_agent.py`, `tests/run_agent/test_streaming_tool_call_repair.py`
- **#67507: fix(agent): correctly merge parallel tool calls from Gemini endpoints**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `91665b5e79`
- **#117927: fix(gemini): thought signature sentinel replay and parallel tool calls**. closed without merge
  - maintainer direction: category `silent_close`; implication `active`

## Fix status

- No merged fix on record.
- Subsystem: `agent`
