# NousResearch/hermes-agent · SQLite state.db concurrent-write and locking fixes

## Open now

- Nothing open on GitHub.

These issues and fixes address multiple sources of unintended concurrent writes and lock conflicts on state.db, including lifecycle guard raw-opens bypassing POSIX locks, WAL split-brain conditions, and serialization of SQLite access across cron, gateways, dashboard, and doctor.

## 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 #108076. Verify it addresses your case.
- **Recommended:** read PR #108076 (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-108076`. 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

- #102589: cron/lifecycle_guard raw-opens state.db when a command mentions its path, dropping the gateway's POSIX locks -> WAL split-brain

## Prior & competing PRs

- **#108076: state.db no longer gets a second writer from profile gateways, the dashboard, the lifecycle guard or doctor --fix (#102120 #107688 #102589 #107440; salvage #103489 #102682 #108012 #105428)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `contributors/emails/[redacted:email]`, `cron/lifecycle_guard.py`, `gateway/hosted_room_policy_checkpoint.py`, `gateway/hosted_rooms.py`, `hermes_cli/doctor_state.py`, `hermes_cli/web_server_lifecycle.py`, `hermes_state_holders.py`, `tests/cron/test_lifecycle_guard_live_db.py`, `tests/gateway/test_hosted_rooms.py`, `tests/hermes_cli/test_doctor_wal_holder_guard.py`, `tests/hermes_cli/test_web_server.py`, `tests/state/test_fts_holder_instance_scope.py`, `tests/tui_gateway/test_groups_methods.py`, `tests/tui_gateway/test_hosted_room_service.py`, `tui_gateway/hosted_room_service.py`
- **#102596: fix(cron): route lifecycle guard script reads through the sqlite live-connection registry**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `902eccae3f`, `#102682`, `#108076`
- **#102682: fix(cron): serialize lifecycle script reads with SQLite locks**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `902eccae3f`, `#108076`

## Fix status

- Merged to main in PR #108076 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-11`.
