# NousResearch/hermes-agent · History block duplication in state persistence layer

## Open now

- Nothing open on GitHub.

These items concern a bug where history blocks are duplicated in state storage during long sessions, and related fixes addressing how restored or re-flushed history blocks are identified and deduplicated by logical identity.

## TL;DR

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

- #129065: \[Bug\]: Desktop long sessions — a whole history block is duplicated in state.db (distinct message_uid, timestamps 21h apart), not renderer-only

## Prior & competing PRs

- **#130632: fix(state): a re-flushed restored history block no longer duplicates in state.db (#129065, salvage #129133)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/transcript_repair.py`, `hermes_state.py`, `hermes_state_common.py`, `hermes_state_messages.py`, `tests/acp_adapter/test_session.py`, `tests/hermes_state/test_unaddressed_rewrite_identity.py`
- **#129110: fix(state): a re-flushed restored history block no longer duplicates**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `ac7927ca48`, `#130632`
- **#129133: fix(state): recover unaddressed rewrites by logical identity**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `ac7927ca48`, `#130632`
- **#130456: state: stamp reloaded dicts with persistence marker to prevent history duplication**. closed without merge
  - maintainer direction: category `silent_close`; implication `active`

## Fix status

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