hermes - 💡(How to fix) Fix Feature: stale payload eviction in context assembly

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • preserve/error-output exceptions

Root Cause

Long Hermes sessions often hit compression not because the durable conversation is large, but because old heavy payloads remain in the active prompt:

RAW_BUFFERClick to expand / collapse

Feature

Add a context-assembly layer that evicts or shrinks stale heavy payloads before each model call, similar in spirit to ClawSqueezer for OpenClaw.

Motivation

Long Hermes sessions often hit compression not because the durable conversation is large, but because old heavy payloads remain in the active prompt:

  • large terminal/tool outputs
  • test/build logs
  • large tool arguments
  • file read results
  • images or attachment metadata
  • bulky MCP/tool responses that were useful for one turn and then become dead weight

RTK and context-mode help prevent some large outputs from entering the transcript, but Hermes still needs a runtime-level cleanup pass for payloads that are already in session history.

Proposed behavior

Before assembling/sending messages to the model:

  1. Preserve recent turns exactly (protect_last_n or equivalent).
  2. Scan older messages for heavy payload blocks.
  3. Replace stale heavy payloads with compact placeholders, e.g.
    • source tool name
    • timestamp/message id
    • size/token estimate
    • short preview or summary
    • recall handle if the raw payload exists in session DB / indexed storage
  4. Never mutate the canonical transcript destructively; only alter the active prompt view.
  5. Make thresholds configurable:
    • min size/tokens to evict
    • age in turns before eligible
    • per-tool policies
    • preserve/error-output exceptions
  6. Surface stats: tokens evicted, payload classes, compression delay avoided.

Non-goals

  • This is not full summarization or LCM-style memory.
  • This should not replace context compression.
  • This should not hide exact recent errors needed for debugging.

Why this belongs in Hermes

Only the agent runtime can reliably clean context already in the conversation assembly path. External tools like RTK/context-mode help at ingestion time, but they cannot automatically remove stale payloads from old Hermes messages.

Related concepts

  • ClawSqueezer: stale payload eviction for OpenClaw
  • RTK: command-output compression before context ingestion
  • context-mode: out-of-band bulk processing/indexing
  • LCM/lossless-claw: progressive summary/recall DB

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Feature: stale payload eviction in context assembly