Bug Description
When Hermes performs automatic context compression multiple times within the same session lineage, the iterative compaction summary can keep old completed topics alive and allow them to overshadow the current active topic.
This is not just stale-summary leakage across /new sessions (#2635). It happens within the same long-running session chain after multiple compression splits.
In my case, an earlier completed topic ("Bybit Card cashback") was preserved so strongly in the compaction summary that, while I was actively discussing OpenViking, Hermes suddenly answered about Bybit again.
Actual Behavior
After automatic compression:
- previously completed topics remain highly prominent in the injected handoff summary
- the current active topic is not sufficiently prioritized
- the assistant may answer the older completed topic instead of the current one
Observed behavior:
- Earlier topic: Bybit Card / ChatGPT cashback
- Current topic: OpenViking database/backend support
- After compression, the assistant unexpectedly resumed talking about Bybit
Expected Behavior
After automatic compression:
- the current active topic should dominate the summary
- older completed topics should be aggressively demoted unless they remain directly relevant
- the assistant should continue from the most recent user intent, not from a previously completed topic
Relevant Local Findings
Compression split occurred
agent.log
2026-04-14 09:42:16,134 INFO gateway.run: Session split detected: 20260413_160032_e7cc1ea5 → 20260414_094155_13417e (compression)
Earlier topic in same lineage
- Bybit question at
2026-04-14 03:18 UTC
Current topic before wrong answer
- OpenViking question at
2026-04-14 09:35 UTC
Suspected Root Cause
The issue appears to come from the interaction of:
-
Iterative summary update
agent/context_compressor.py
_previous_summary is reused and updated instead of rebuilt
- old “Done / Critical Context / Key Decisions” content persists too strongly
-
No automatic active-topic focus
focus_topic exists for manual /compress <focus>
- but automatic compression does not appear to derive focus from the latest user turns
-
No strong “topic switch” logic
- the iterative update prompt says to preserve existing relevant info and remove only clearly obsolete info
- but it does not strongly instruct the summarizer to demote older completed topics once the conversation has clearly moved on
Related Issues / PRs
Suggested Fix Direction
Possible improvements:
- Automatically derive a
focus_topic from the most recent 1–3 user turns during auto compression
- Add a dedicated
## Current Active Topic section with higher priority than Done
- In iterative summary updates, aggressively demote older completed topics when a clear topic shift is detected
- Give stronger instructions that recent user intent outranks historical
Done / Critical Context entries unless explicitly still relevant
Bug Description
When Hermes performs automatic context compression multiple times within the same session lineage, the iterative compaction summary can keep old completed topics alive and allow them to overshadow the current active topic.
This is not just stale-summary leakage across
/newsessions (#2635). It happens within the same long-running session chain after multiple compression splits.In my case, an earlier completed topic ("Bybit Card cashback") was preserved so strongly in the compaction summary that, while I was actively discussing OpenViking, Hermes suddenly answered about Bybit again.
Actual Behavior
After automatic compression:
Observed behavior:
Expected Behavior
After automatic compression:
Relevant Local Findings
Compression split occurred
agent.log2026-04-14 09:42:16,134 INFO gateway.run: Session split detected: 20260413_160032_e7cc1ea5 → 20260414_094155_13417e (compression)Earlier topic in same lineage
2026-04-14 03:18 UTCCurrent topic before wrong answer
2026-04-14 09:35 UTCSuspected Root Cause
The issue appears to come from the interaction of:
Iterative summary update
agent/context_compressor.py_previous_summaryis reused and updated instead of rebuiltNo automatic active-topic focus
focus_topicexists for manual/compress <focus>No strong “topic switch” logic
Related Issues / PRs
Suggested Fix Direction
Possible improvements:
focus_topicfrom the most recent 1–3 user turns during auto compression## Current Active Topicsection with higher priority thanDoneDone / Critical Contextentries unless explicitly still relevant