fix: salvage batch — compaction guidance, memory authority, cache eviction after compression#20579
Merged
Merged
Conversation
…ction after compression - Fix /compact → /compress in context-overflow tips (closes #20020) - Evict cached agent after session hygiene and /compress so system prompt refreshes with current SOUL.md, memory, and skills - Restore memory authority across compaction: change 'informational background data' to 'authoritative reference data' in memory block and SUMMARY_PREFIX, with backward-compatible regex Based on: - PR #20027 by @LeonSGP43 - PR #18767 by @MacroAnarchy - PR #17380 by @vominh1919 PR #17121 boundary marker fix already merged to main (2eef395). PR #9262 user-message anchoring already on main via _ensure_last_user_message_in_tail().
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
Salvage three small compaction/compressor bug fixes from community PRs onto
current main. All applied as clean patches with contributor credit preserved.
Changes
/compact→/compressin context-overflow guidance (closes #20020). Two locations:_normalize_empty_agent_response()and the exception handler return path.gateway/run.pyfinally+ manual/compressfinally.gateway/run.pyagent/context_compressor.py,agent/memory_manager.pyExcluded from this batch
2eef395e1by @wmagev_ensure_last_user_message_in_tail()(commitf19ca50cd)Test plan
Closes #20020