# NousResearch/hermes-agent · Tool calls emitted as text instead of executing

## Open now

- 2 issues, 1 PR open on GitHub.
- #12090: \[Bug\]: Minimax tool calls being sent to telegram instead of executing
- #54283: deepseek.v3.2 leaks raw DSML tool call XML into Telegram output
- PR #98764: fix(bedrock): stop deepseek.v3.2 leaking tool-call scaffolding into the text channel

Multiple models (DeepSeek, MiniMax, Qwen, Anthropic, Hermes) emit tool calls as raw text or XML rather than structured function calls, causing them to leak into output or be dropped. Issues and fixes address parsing, fallback extraction, and stripping of these malformed tool call representations across gateways and the agent loop.

## TL;DR

- 27 member(s): 2 open issue(s), 10 closed issue(s), 1 open PR(s), 1 merged PR(s), 13 PR(s) closed without merging.
- A fix was merged to main in PR #115798. Verify it addresses your case.
- **Recommended:** read PR #115798 (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: `partially_resolved` · deciding PR(s): `pr-115798`. 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.07`: 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

- #12090: \[Bug\]: Minimax tool calls being sent to telegram instead of executing
- #54283: deepseek.v3.2 leaks raw DSML tool call XML into Telegram output

## Closed / duplicate issues

- #741: \[Bug\]: Model outputs tool calls as text instead of using native function calling
- #8965: Tool calls rendered as raw XML instead of being executed (Ollama cloud models via proxy)
- #13031: \[Bug\] Feishu gateway: model outputs tool calls as plain text, never executes -- CLI works fine
- #15453: \[Bug\]: Tool calls not parsed correctly with DeepSeek-V4
- #27834: \[Bug\]: MiniMax/DeepSeek V4 XML tool calls are rendered as text instead of executed in Web UI/gateway
- #29115: Feature: Content-bound tool call extraction layer (fallback for models emitting tool calls as text/XML)
- #35935: MiniMax provider: tool calls output as plain text instead of executing
- #47472: \[bug\] anthropic_messages: tool calls emitted as text (not promoted to tool_use) are dropped, agent loop halts without executing the tool
- #56920: \[Bug\]: Codex OAuth can print shell JSON instead of executing tool calls
- #59291: Tool-call-shaped JSON envelope leaks into Telegram output when a local model emits it as assistant text

## Prior & competing PRs

- **#14601: fix: Step 3.5 Flash tool call fallback parser + orphan </think> strip…**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#741`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#15473: fix: parse DeepSeek-V4 DSML tool calls from response content (#15453)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#7628`, `#7588`
- **#47473: fix(anthropic): salvage text-embedded tool calls not promoted to tool_use**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#47472`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#52322: fix(anthropic): salvage text-embedded antml tool calls not promoted to tool_use**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#47472`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#59601: fix(agent): strip hallucinated tool-call JSON from assistant content before delivery (#59291)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#59309`, `#59309`, `#59291`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#59669: fix(gateway): strip tool-call-shaped JSON envelope from Telegram output (#59291)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `02fa999a0168`, `#59291`, `#59309`, `#59669`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#115798: fix(codex): leaked shell-JSON tool call continues the turn instead of ending it as a final answer (#56920, salvage #56958)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/codex_responses_adapter.py`, `tests/agent/test_codex_responses_adapter.py`
- **#742: fix: recover tool calls output as text by Hermes models**. closed without merge
  - maintainer direction: category `silent_close`; implication `active`
- **#13431: fix: recover inline Hermes tool calls**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#12112`
- **#13446: fix: Feishu gateway tool calls not executing with DashScope/Qwen (#13031)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `756900723a64cb3cbd17bb720773daca9ebabcb1`, `#13031`
- **#47518: fix(anthropic): salvage text invoke tool calls**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#47473`, `#47472`
- **#47853: fix(anthropic): salvage tool calls from text blocks when tool_use blocks missing**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#47473`, `#47472`, `#47473`, `#47518`
- **#56958: \[codex\] Treat leaked Codex shell JSON as incomplete**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `cdac150ec3a6`, `#115798`, `#56920`, `#56958`
- **#59309: fix(agent): recover leaked clarify JSON envelopes**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `36ac69e8b091`, `#59291`, `#19253`
- **#98764: fix(bedrock): stop deepseek.v3.2 leaking tool-call scaffolding into the text channel**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `61c06ca3ce`, `7985ea4599`, `61c06ca3ce`
  - files: `agent/bedrock_adapter.py`, `tests/agent/test_bedrock_adapter.py`

## Fix status

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