# NousResearch/hermes-agent · Tool-call parsing issues with nested JSON and inline XML

## Open now

- 1 issue, 1 PR open on GitHub.
- #22696: BUG: tool_use parser fails intermittently when closing tag appears inside JSON strings
- PR #23888: fix(agent): replace fragile tool_call regex with brace-depth scanner for nested JSON

Most members concern how tool_use/tool_call blocks are extracted from model output, with reports of regex-based parsing mishandling nested JSON or closing tags inside JSON strings. One member proposes a brace-depth scanner, and another covers recovering inline XML tool calls from chat-completion content, which is adjacent but may be a distinct case.

## TL;DR

- 4 member(s): 1 open issue(s), 1 closed issue(s), 1 open PR(s), 0 merged PR(s), 1 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.39`: 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

- #22696: BUG: tool_use parser fails intermittently when closing tag appears inside JSON strings

## Closed / duplicate issues

- #22688: Bug: tool_use regex parser fails with nested JSON — blocks pass through as raw text

## Prior & competing PRs

- **#23508: Recover inline XML tool calls from chat-completion content**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#22696`, `#23888`
- **#23888: fix(agent): replace fragile tool_call regex with brace-depth scanner for nested JSON**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#23508`
  - files: `agent/copilot_acp_client.py`, `tests/agent/test_copilot_acp_client.py`

## Fix status

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