# NousResearch/hermes-agent · Fix turn-start detection in chained responses history

## Open now

- Nothing open on GitHub.

These items address bugs in how the start of a new turn is detected within chained /v1/responses calls, covering role+content matching, prefix matching failures when messages are modified, and preventing replayed tool calls or duplicated history after repair or compaction.

## TL;DR

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

- #89891: fix: _response_messages_turn_start_index prefix matching fails when agent modifies messages

## Prior & competing PRs

- **#116326: Chained /v1/responses turns no longer replay earlier tool calls or double the stored history after history repair/compaction (#89891, rebuild of #70695)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `gateway/platforms/api_server_openai_routes.py`, `gateway/platforms/api_server_turn_boundary.py`, `tests/gateway/test_api_server_responses_history_dedupe.py`, `tests/gateway/test_api_server_turn_boundary.py`, `website/docs/user-guide/features/api-server.md`
- **#90087: fix(gateway): turn-start detection uses role+content matching (ignoring metadata)**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#70695`, `#89316`

## Fix status

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