feat: improve context compaction handoff summaries#1273
Merged
Conversation
Adapt PR #916 onto current main by replacing the old context summary marker with a clearer handoff wrapper, updating the summarization prompt for resume-oriented summaries, and preserving the current call_llm-based compression path.
This was referenced Mar 14, 2026
Sarge-Reaper
added a commit
to Sarge-Reaper/hermes-agent
that referenced
this pull request
Mar 24, 2026
Applied Karpathy's autoresearch pattern to autonomously optimize the context compressor. 50 experiments run, 8 improvements kept. - _SUMMARY_RATIO 0.20 → 0.30 (more budget for summaries) - _MIN_SUMMARY_TOKENS 2000 → 500 (no inflation on short conversations) - _MAX_SUMMARY_TOKENS 8000 → 4000 (tighter cap) - _DEFAULT_TAIL_TOKEN_BUDGET 20000 → 8000 (more aggressive compression) - Truncation 3000 → 4500 chars (retains more tool output) - Regex file path pre-extraction with "MUST appear in summary" - Template restructured: Relevant Files + Critical Context moved up - MANDATORY PRESERVATION RULES added to both prompts Addresses NousResearch#705, NousResearch#1273, and context drift from lossy summarization. Score improved 3.6% (0.6346 → 0.6572).
4 tasks
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
Adapt PR NousResearch#916 onto current main by replacing the old context summary marker with a clearer handoff wrapper, updating the summarization prompt for resume-oriented summaries, and preserving the current call_llm-based compression path.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
Adapt PR NousResearch#916 onto current main by replacing the old context summary marker with a clearer handoff wrapper, updating the summarization prompt for resume-oriented summaries, and preserving the current call_llm-based compression path.
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
Adapt PR NousResearch#916 onto current main by replacing the old context summary marker with a clearer handoff wrapper, updating the summarization prompt for resume-oriented summaries, and preserving the current call_llm-based compression path.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
Adapt PR NousResearch#916 onto current main by replacing the old context summary marker with a clearer handoff wrapper, updating the summarization prompt for resume-oriented summaries, and preserving the current call_llm-based compression 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
Test plan
Refs #916