mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-24 16:54:43 +00:00
fix(P2): add dedup note for repeated [SKILL_PRUNED] markers across compactions
After successive compressions, the same skill may appear as [SKILL_PRUNED] multiple times in head/tail/summary. Without guidance, the LLM could redundantly reload the same skill multiple times. Add an explicit note in the summary: one reload is sufficient. Fixes #32106.
This commit is contained in:
parent
7d03a9d512
commit
0b3bb832cc
1 changed files with 11 additions and 0 deletions
|
|
@ -1719,7 +1719,18 @@ This compaction should PRIORITISE preserving all information related to the focu
|
|||
f"[SKILL_PRUNED: content lost in compression; "
|
||||
f"reload with skill_view(name='{sn}')"
|
||||
)
|
||||
# Dedup note: across multiple compactions, the same skill
|
||||
# may appear as [SKILL_PRUNED] in head/tail/summary.
|
||||
# One reload is enough — the skill stays in context.
|
||||
summary += "\n## Pruned Skills\n" + "\n".join(_ps)
|
||||
summary += (
|
||||
"\n\n**Note:** The same skill may appear as [SKILL_PRUNED] "
|
||||
"multiple times across this summary and the protected "
|
||||
"messages above/below (successive compactions). "
|
||||
"Reloading a skill **once** is sufficient — it remains "
|
||||
"in context for the rest of the session. Do not reload "
|
||||
"the same skill multiple times."
|
||||
)
|
||||
# Store for iterative updates on next compaction
|
||||
self._previous_summary = summary
|
||||
self._summary_failure_cooldown_until = 0.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue