Duplicate transcript entries on gateway replay/flush

NousResearch/hermes-agent · cluster 123462

Data as of

Nothing open on GitHub. Fix merged in #123975. Check it covers your case.

The short answer

0open issues
0open PRs
7items grouped
Known?
Yes. 7 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #123975. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #125146. That is separate from the fix event.
Still open
Nothing open on GitHub.

These issues and pull requests concern a bug where replayed or reloaded history rows are re-inserted or re-appended to the transcript database, producing duplicate blocks. The fixes focus on preserving persistence stamps and repairing rows in place rather than re-flushing them.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #123975 fix(gateway): keep the persisted stamp on replayed rows so stamp-only flushes don't duplicate history

    merged to main

    files: gateway/run.py, tests/gateway/test_cached_agent_history_guard.py, tests/gateway/test_gateway_history_persistence_stamp.py

  • #125146 fix(persistence): stop re-inserting sanitized user and tool rows on re-flush

    merged to main

    files: agent/message_metadata.py, agent/message_sanitization.py, agent/session_persistence.py, agent/transcript_repair.py, contributors/emails/[redacted:email], hermes_state_compression.py, hermes_state_messages.py, tests/agent/test_compression_rotation_state.py, tests/agent/test_tool_call_incremental_persistence.py

4 PRs closed without merging

From the close comments: done elsewhere 2 · closed without comment 1 · partial fix 1

  • #123472 fix(gateway): carry _db_persisted stamp in _build_replay_entry to prevent duplicate transcript flushes · done elsewhere → cb3142d, #123975
  • #123473 fix(gateway): preserve durable replay identity across DB reload · closed without comment
  • #123487 fix(gateway): preserve _db_persisted stamp in _build_replay_entry to avoid duplicate transcript blocks · done elsewhere → cb3142d, #123975
  • #123849 fix(persistence): repair inactive transcript rows in place · partial fix → dab7201, d0288be
Closed issues · 1
  • Closed#123462Gateway re-appends the whole loaded history to state.db on some tool turns (duplicate transcript blocks)
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.29: the share of item 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.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Merged PRs
#123975, #125146
Closed issues
1
Attempts
4 PRs closed without merging
Fix link checked
27 Sep 2026

For your agent

The same facts, typed.