# NousResearch/hermes-agent · Fix unsynchronized SessionDB reads causing crashes

## Open now

- Nothing open on GitHub.

These issues and patches address multiple read paths in SessionDB that bypass locking and the read context, accessing the shared writer connection without synchronization. The fixes route reads through the proper context and connection pool to prevent dirty reads and crashes such as SIGSEGV and SystemError.

## TL;DR

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

- #86516: state: four read paths bypass self._lock / _read_ctx and read on the shared write connection (dirty reads of uncommitted transactions)

## Prior & competing PRs

- **#99502: fix(state): eliminate unsynchronized reads on the shared SessionDB writer connection (SIGSEGV / SystemError class)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `hermes_state.py`, `hermes_state_search.py`, `tests/state/test_writer_conn_thread_safety.py`, `tests/test_hermes_state_conn_lock_audit.py`, `tests/test_session_db_read_path_split.py`
- **#87612: fix(state): WAL probe fallback, bare-SELECT locking, writable_schema finally, read-pool self-heal**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`
- **#99454: fix(state): route remaining SessionDB SELECTs through _read_ctx**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#82428`

## Fix status

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