Conversation
bennybuoy
marked this pull request as ready for review
August 2, 2026 10:23
This was referenced Aug 5, 2026
6 of 9 tasks
Author
This was referenced Aug 15, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
on_session_finalizeplugin hook/new, which reuses its agent/context engineWhy
Hermes deep-copies the registered context-engine prototype for each
AIAgent. In long-lived Desktop and gateway processes, retiring an agent does not currently guarantee that the clone's SQLite-backed LCM helpers are closed. Finalized sessions can therefore leave Store, DAG, and lifecycle descriptors open.The plugin already owns an exact weak session-to-engine registry and an idempotent
shutdown()boundary. This change connects those existing pieces through Hermes' supported hard session-boundary hook; it does not patch Hermes core or sweep unrelated engines.Verification
git diff --check: passedScope
This closes plugin-owned LCM SQLite resources. It does not claim to close Hermes-owned
state.dbconnections.Automated review
GitHub Copilot reviewed the identical diff in bennybuoy/hermes-lcm#24, because fork contributors cannot request reviewers on the upstream repository. Its initial test-helper suggestion was addressed in
085d6ee; a second review of that commit covered both changed files and generated no new comments.