# NousResearch/hermes-agent · SQLite state.db locking and WAL file safety fixes

## Open now

- Nothing open on GitHub.

These issues and fixes address bugs in how state.db WAL/SHM files are handled across processes, including lock drops during permission tightening, stray file unlinking by sibling processes, and safer chmod approaches to avoid disrupting live database connections.

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

- #109727: \[Bug\]: a second Hermes process unlinks the live state.db-wal/-shm and strands the running gateway on Linux (DeletedWalGenerationError)

## Prior & competing PRs

- **#109841: fix(state): tightening state.db modes no longer drops the holder's SQLite locks (#109786, salvage #109754)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `hermes_state.py`, `tests/test_hermes_state.py`
- **#110544: state.db WAL survives sibling closes and stray lock cancellation on every runtime (Desktop chat dies after update; salvage #109758)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `hermes_state.py`, `hermes_state_dbfile.py`, `hermes_state_lockguard.py`, `tests/hermes_state/test_deleted_wal_generation_guard.py`, `tests/hermes_state/test_wal_lock_guard.py`
- **#109754: fix(state): tighten existing db files by chmod(2), not an open/fchmod/close cycle**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#109841`

## Fix status

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