state.db teardown races and self-heal serialization fixes

NousResearch/hermes-agent · cluster 102827

Data as of

Nothing open on GitHub. Fix merged in #102117. Check it covers your case.

The short answer

0open issues
0open PRs
7items grouped
Known?
Yes. 7 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #102117. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #104456. That is separate from the fix event.
Still open
Nothing open on GitHub.

Most members address concurrent access bugs around state.db teardown, cron worker lifecycle, and self-heal reopen races that could cause database corruption. One member is an unrelated whole-codebase refactor reducing source lines of code.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #102117 refactor: whole-codebase simplification — −34% source LOC, every god file decomposed, zero behavior change

    merged to main

    files: .github/workflows/lint.yml, AGENTS.md, COMPAT_MANIFEST.md, CONTRIBUTING.md, acp_adapter/auth.py, acp_adapter/commands.py, acp_adapter/content.py, acp_adapter/edit_approval.py, acp_adapter/entry.py, acp_adapter/events.py, acp_adapter/model_catalog.py, acp_adapter/permissions.py, acp_adapter/provenance.py, acp_adapter/server.py, acp_adapter/session.py, acp_adapter/tools.py, agent/AGENTS.md, agent/__init__.py, agent/account_usage.py, agent/acp_openai_bridge.py (+2635 more)

  • #104368 fix(cron): a finished job no longer reopens the released state.db on agent teardown (#102827 cron half, salvage #102454)

    merged to main

    files: contributors/emails/[redacted:email], cron/scheduler.py, tests/cron/test_scheduler.py

  • #104456 SessionDB teardown no longer overlaps a live handle for the same state.db: counted per-path barrier + cron workers own their teardown (#102827, salvage of #103118 by @JoaoMarcos44)

    merged to main

    files: agent/trace_upload.py, cron/scheduler.py, cron/scheduler_detached_worker.py, gateway/platforms/api_server.py, gateway/run.py, hermes_cli/web_server_lifecycle.py, hermes_cli/web_server_sessions.py, hermes_state_registry.py, tests/cron/test_cleanup_timeout.py, tests/cron/test_scheduler.py, tests/hermes_state/test_shared_session_db_registry.py

3 PRs closed without merging

From the close comments: superseded by another PR 2 · merged via another change 1

  • #102859 fix(state): serialize self-heal reopens per database path (#102827) · superseded by another PR → #103306, #102827, #94736
  • #103118 fix(state): prevent SessionDB teardown races with active cron workers · merged via another change → #104456, #104368, #102827
  • #103306 fix(state): serialize self-heal reopen with writers · superseded by another PR → #102859, #102827, #103118, #102117
Closed issues · 1
  • Closed#102827[Bug] v0.21.0: #94736 self-heal reopen path can race concurrent writer threads → state.db structural corruption after cron teardown (NOTADB/malformed)
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.33: the share of item 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.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Merged PRs
#102117, #104368, #104456
Closed issues
1
Attempts
3 PRs closed without merging
Fix link checked
6 Sep 2026

For your agent

The same facts, typed.