# NousResearch/hermes-agent · Corrupt timestamp and state DB resilience fixes

## Open now

- Nothing open on GitHub.

These items address crashes and failures caused by corrupt or invalid timestamp values and malformed data in the state database. The work focuses on constraining bad values and preventing single corrupt rows from breaking sessions, export, insights, or prune operations.

## TL;DR

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

- #91536: \[Bug\]: Sessions pane crashes with "Invalid time value" — recovery wrote garbage floats into messages.timestamp

## Prior & competing PRs

- **#108086: state.db: one corrupt row (bad timestamp / malformed marker JSON / oversized IN-list) no longer kills sessions list, export, insights or prune (#102399 #102352 #99959 #94691 #106060; salvage #106071 #101726 #94701 #102679 #100658)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/insights.py`, `hermes_cli/cli_session_mixin.py`, `hermes_cli/session_export.py`, `hermes_cli/session_export_html.py`, `hermes_cli/session_export_md.py`, `hermes_cli/session_filters.py`, `hermes_cli/sessions_cmd.py`, `hermes_cli/sessions_cmd_browse.py`, `hermes_cli/timefmt.py`, `hermes_state_common.py`, `hermes_state_compression.py`, `hermes_state_gateway.py`, `hermes_state_maintenance.py`, `hermes_state_messages.py`, `hermes_state_portability.py`, `hermes_state_schema.py`, `hermes_state_sessions.py`, `tests/hermes_state/test_corrupt_row_robustness.py`, `tests/test_hermes_state.py`, `tests/test_session_export_batch.py` (+2 more)
- **#122283: fix(state): keep corrupt timestamp cells out of last_active and recovered databases**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `hermes_cli/session_recovery.py`, `hermes_state_common.py`, `hermes_state_sessions.py`, `tests/hermes_cli/test_session_recovery_timestamps.py`, `tests/hermes_state/test_corrupt_row_robustness.py`
- **#91543: fix(state): constrain last_active to a sane epoch window**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `a2413495ad`, `#108086`

## Fix status

- Merged to main in PR #122283 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-25`.
- Subsystem: `apps/desktop`
