# NousResearch/hermes-agent · Duplicate inbound user turn persistence fixes

## Open now

- 0 issues, 1 PR open on GitHub.
- PR #79610: fix(gateway): platform_message_id 数据库级去重，终止 Telegram 重试循环会话膨胀

These issues and PRs address a bug where inbound user turns were being persisted twice—once by the gateway and once by the agent flush—sometimes with mismatched platform_message_id values. Fixes span deduplication logic, error recovery paths, and removal of redundant user echo persistence.

## TL;DR

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

- #104653: \[Bug\]: inbound user turns are persisted twice (gateway + agent flush); platform_message_id is set on one row and NULL on the other

## Prior & competing PRs

- **#104899: fix(codex): accepted inputs no longer appear twice in session history (#104653)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/codex_runtime.py`, `agent/transports/codex_app_server_session.py`, `evals/codex_echo/README.md`, `evals/codex_echo/fixture_server.py`, `evals/codex_echo/probe.py`, `tests/agent/test_codex_echo_ownership.py`, `tests/agent/transports/test_codex_app_server_session.py`, `website/docs/developer-guide/session-storage.md`
- **#105334: fix(gateway): error recovery no longer duplicates accepted inputs (#104653)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/turn_context.py`, `evals/gateway_failure_ownership/README.md`, `evals/gateway_failure_ownership/foreign_writer.py`, `evals/gateway_failure_ownership/probe.py`, `gateway/run_turn.py`, `gateway/run_turn_runner.py`, `gateway/session_transcript.py`, `gateway/turn_context.py`, `hermes_state_messages.py`, `tests/gateway/test_failure_writer_ownership.py`, `website/docs/developer-guide/session-storage.md`
- **#79610: fix(gateway): platform_message_id 数据库级去重，终止 Telegram 重试循环会话膨胀**. open
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `4ac0f01f5d`, `996ec74a03`
  - files: `hermes_state_messages.py`, `tests/gateway/test_79576_platform_message_id_dedupe.py`
- **#104673: Fix inbound user turns persisted twice (gateway + agent flush)**. closed without merge
  - maintainer direction: category `wontfix_bydesign`; implication `wontfix`; refs `693641aa8b`
- **#104698: fix(codex): drop persisted app-server user echo**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `cd0b5b9adda8229981a48b782415b9e6de107cf4`, `3114916ee4bc62d45e635f6a5a289f6c40069cb0`, `#104899`, `#93546`, `#105334`

## Fix status

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