fix(compression): keep same-session handoff when compress_end is degenerate (#83248) - #83290
Merged
teknium1 merged 2 commits intoAug 15, 2026
Conversation
…discard A degenerate compress_end can hide an in-window handoff past the cut; the NousResearch#57835 guard then cleared a valid same-session _previous_summary (NousResearch#83248).
… keep Regression for NousResearch#83248: handoff beyond compress_end must not clear a valid same-session _previous_summary via the cross-session discard path.
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
_previous_summarydiscard, so a degeneratecompress_endcannot hide an in-window same-session handoff.compress_endbefore the handoff index and asserts_previous_summaryis still present when the summarizer runs.Fixes #83248
Test plan
scripts/run_tests.sh tests/agent/test_context_compressor_summary_continuity.py tests/agent/test_context_compressor_cross_session_guard.py -qcompress_endand confirm the iterativePREVIOUS SUMMARY:path still runs (no cross-session discard log / no one-turn wipe)