feat: add session rollover lifecycle helper - #17
Merged
stephenschoettler merged 1 commit intoApr 15, 2026
Merged
stephenschoettler merged 1 commit into
stephenschoettler merged 1 commit into
Conversation
stephenschoettler
approved these changes
Apr 15, 2026
stephenschoettler
left a comment
Owner
There was a problem hiding this comment.
Simple and correct. Having the lifecycle ordering (flush → reset → bind → carry over) in one method prevents integration bugs. Repeated rollover test is a good edge case to cover.
This was referenced Sep 23, 2026
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
rollover_session(...)lifecycle helper to the LCM engine/new-style session boundaries without duplicating retained nodesWhy
Session boundaries are exactly where long-lived context engines get weird if lifecycle handling is loose.
This PR takes the smallest useful step:
That gives Hermes LCM a cleaner rollover path right now, without overreaching into a much larger bootstrap/checkpoint design in the same slice.
Notes
This is intentionally not a full bootstrap / checkpoint / transcript-rotation implementation yet.
That larger state model still needs its own design and review.
Related host-side compatibility follow-up: NousResearch/hermes-agent#8416.
That companion PR improves Hermes Agent's external context-engine lifecycle ergonomics without changing default built-in behavior or bundling hermes-lcm into Hermes Agent.
Test Plan
python3 -m pytest tests/test_lcm_engine.py -qpython3 -m pytest tests/ -q~/.hermes/plugins/hermes-lcm