# NousResearch/hermes-agent · Anthropic malformed JSON streaming tool call fixes

## Open now

- 0 issues, 1 PR open on GitHub.
- PR #107864: fix(anthropic): recover malformed streamed tool JSON

Multiple fixes and approaches addressing a bug where Anthropic streaming tool calls fail permanently due to malformed JSON output. The cluster explores several strategies including fallback to buffered requests, retries, and disabling fine-grained tool streaming.

## TL;DR

- 6 member(s): 0 open issue(s), 1 closed issue(s), 1 open PR(s), 1 merged PR(s), 3 PR(s) closed without merging.
- A fix was merged to main in PR #109324. Verify it addresses your case.
- **Recommended:** read PR #109324 (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-109324`. 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.33`: 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

- #107830: \[Bug\]:Streaming tool calls fail permanently with "expected value at line 1 column 11" when Anthropic emits malformed JSON

## Prior & competing PRs

- **#109324: fix(anthropic): malformed streamed tool JSON retries with buffered tool input (#107830, salvage #107864)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/anthropic_adapter.py`, `agent/api_error_summary.py`, `agent/chat_completion_helpers.py`, `run_agent.py`, `tests/agent/test_streaming.py`
- **#107833: fix(anthropic): fall back to messages.create() when streaming fails on malformed JSON (#107830)**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `#99692`
- **#107864: fix(anthropic): recover malformed streamed tool JSON**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `d10fbf023c8508e3993dba889fd9c79afaa9e62d`
  - files: `agent/api_error_summary.py`, `agent/chat_completion_helpers.py`, `run_agent.py`, `tests/run_agent/test_streaming.py`
- **#108583: fix(anthropic): disable fine-grained tool streaming by default and fallback on malformed JSON (#107830)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#109324`, `#107830`
- **#109056: fix(anthropic): remove fine-grained-tool-streaming beta to prevent malformed JSON streaming failures (fixes #107830)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#109324`, `#107830`, `#107833`

## Fix status

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