# NousResearch/hermes-agent · Anthropic streaming partial stub shape and error handling

## Open now

- Nothing open on GitHub.

These issues and PRs address malformed upstream Anthropic stream handling, including IndexError crashes from non-contiguous content block indices and incorrect partial-stream stub shapes returned during recovery in anthropic_messages mode.

## TL;DR

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

- #45908: anthropic_messages: malformed upstream stream (non-contiguous content_block index) crashes with IndexError and retries 10x

## Prior & competing PRs

- **#46003: fix(agent): shape partial-stream stub to match active api_mode**. closed without merge · fix tier `suggested`
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `#45919`, `#45908`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#121554: fix(anthropic): normalize usage:null streams, non-stream fallback on out-of-order SSE, Messages-shaped partial stubs**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/anthropic_adapter.py`, `agent/chat_completion_helpers.py`, `tests/agent/test_anthropic_stream_fallbacks.py`, `tests/agent/test_streaming.py`
- **#45919: fix(streaming): return Anthropic-shaped partial stubs**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `44f6d3bbee`, `#121554`, `#45908`
- **#45920: fix(agent): return Anthropic-shaped partial stream stub in anthropic_messages mode**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#45919`
- **#45922: fix(agent): shape partial-stream recovery stub for anthropic_messages mode**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `44f6d3bbee`, `#45908`, `#121554`
- **#45971: fix(agent): return anthropic partial stream stubs**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `#45919`, `#45908`
- **#46016: fix(streaming): catch IndexError from malformed upstream streams (#45908)**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#45919`, `#45908`, `#45920`, `#45922`, `#45971`

## Fix status

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