fix(hindsight): avoid resending retained turns on append#40519
Closed
skylarbpayne wants to merge 1 commit into
Closed
fix(hindsight): avoid resending retained turns on append#40519skylarbpayne wants to merge 1 commit into
skylarbpayne wants to merge 1 commit into
Conversation
Contributor
changman
pushed a commit
to changman/hermes-agent
that referenced
this pull request
Jun 10, 2026
… whole session (NousResearch#40605) Closes NousResearch#40503. Salvaged from NousResearch#40519; re-verified on main, tightened, tested. Co-authored-by: skylarbpayne <skylarbpayne@users.noreply.github.com>
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
update_mode="append".Root cause
Hermes probes for Hindsight
update_mode="append"support and then reuses the stable session document id. Butsync_turn()still serialized and resent every turn accumulated in the process on every retain. On live Palmer, this produced giant repeated async retain payloads; the embedded daemon spent minutes splitting multi-million-token batches, stopped answering/healthwithin the 2s daemon-manager timeout, and the next client startup misclassified the busy Hindsight listener on port 9712 as a "non-hindsight process".Test Plan
PYTHONPATH=. pytest tests/plugins/memory/test_hindsight_provider.py::TestSyncTurn::test_sync_turn_appends_only_new_turns_when_append_supported tests/plugins/memory/test_hindsight_provider.py::TestSyncTurn::test_sync_turn_accumulates_full_session_without_append_support -qPYTHONPATH=. pytest tests/plugins/memory/test_hindsight_provider.py -qPYTHONPATH=. pytest tests/plugins/memory -qNotes
This PR avoids the biggest runaway payload source. It does not mutate local Palmer Hindsight config or kill/restart daemons; that was explicitly out of scope without approval.