Session state and token accounting bug fixes
Cluster 73823 · agent. Data as of
Nothing open on GitHub. Fix merged in #75883 on 1 Aug 2026. Check it covers your case.
The short answer
- Known?
- Yes. 3 related items grouped here, 1 issue already closed.
- Fix event
- A fix was merged to main in PR #75883. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
resolved, deciding PR #75883. That is separate from the fix event. - Still open
- Nothing open on GitHub.
These items address a cluster of session-state bugs including safe close tracking, flush-cursor fixes, row-retry logic, and a specific issue where the session_model_usage primary key rebuild was gated behind a version check that made token and cost accounting permanently broken on some installs.
Open issues0
Open PRs0
Fixes on record
-
#75883 fix(state): four session-state fixes — safe close tracking, flush-cursor class fix, row-retry, usage-PK healer
files:
agent/context_compressor.py,agent/turn_finalizer.py,contributors/emails/[redacted:email],contributors/emails/[redacted:email],hermes_cli/sqlite_safe_read.py,hermes_state.py,hermes_state_schema.py,tests/agent/test_micro_compaction.py,tests/agent/test_turn_finalizer_final_response_persistence.py,tests/run_agent/test_identity_flush.py,tests/state/test_no_more_rows_retry.py,tests/state/test_session_model_usage_pk_heal.py,tests/test_sqlite_lock_safe_inspection.py
1 PR closed without merging
From the close comments: merged via another change 1
-
#73838 fix: heal session_model_usage PK unconditionally to restore token/cost accounting (#73823) · merged via another change →
#75883,#73823
Closed issues · 1
- Closed#73823[Bug]: Token/cost accounting dies permanently on installs already at schema_version >= 22 — the session_model_usage PK rebuild is unreachable behind `current_version < 22`
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.67: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means 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 LabAt a glance
- Subsystem
- agent
- Merged PRs
- #75883
- Closed issues
- 1
- Attempts
- 1 PR closed without merging
- Fix link checked
- 1 Aug 2026