hermes - ๐Ÿ’ก(How to fix) Fix [Bug]: Context compression causes permanent task loss โ€” model forgets in-progress work after MiniMax 529 [2 comments, 3 participants]

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โ€ฆ
GitHub stats
NousResearch/hermes-agent#11914โ€ขFetched 2026-04-18 05:58:16
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
0
Author
Timeline (top)
commented ร—2cross-referenced ร—1

Root Cause

Root Cause (preliminary)

RAW_BUFFERClick to expand / collapse

Bug Description

When a conversation triggers context compression (summarisation), the model completely loses the current task context. The specific symptoms are:

  1. User is discussing a task or topic
  2. Conversation hits the compression trigger threshold; Hermes calls MiniMax for summarisation
  3. If the summarisation call encounters HTTP 529:
    • The model receives a static fallback text instead of the actual preserved message tail
    • This breaks the continuity of context after compression
  4. User asks the model to continue the interrupted task
  5. Model starts responding to content from several rounds ago, not the interrupted task

Contrast with OpenClaw: OpenClaw using the same MiniMax API does not have this problem with the same 529 scenario.


Root Cause (preliminary)

Two-part failure:

  1. Summarisation LLM call fails due to MiniMax HTTP 529 (cluster overload)
  2. Fallback mechanism injects static placeholder text ("context lost, continue from recent messages") instead of actual preserved message tail โ€” model cannot recover the interrupted task from this

The fallback appears to use a static "context unavailable" message rather than concatenating the genuinely preserved message tail, which is likely how OpenClaw handles it.


Additional Observations

  • 529 errors appear to affect summarisation calls specifically (primary model calls may succeed while summarisation fails)
  • OpenClaw does NOT have this problem with the same MiniMax API โ€” suggesting the issue is in Hermes fallback handling, not MiniMax
  • After compression failure, the model next response is consistently off-topic (responding to something from several rounds ago)
  • User must re-explain the task from scratch to recover

Expected vs Actual Behavior

Expected: After context compression, model should continue naturally from the preserved message tail with full awareness of the in-progress task.

Actual: Model loses the thread entirely and responds to stale topics.


Proposed Investigation

  1. Compare context compression fallback logic between OpenClaw and Hermes (how does OpenClaw preserve context on 529?)
  2. Verify whether fallback currently preserves actual message tail or uses static placeholder
  3. Consider changing fallback to concatenate actual preserved messages rather than static text
  4. Investigate why summarisation calls seem more susceptible to 529 than primary model calls

Environment

  • Hermes agent with MiniMax-M2.7 as primary model
  • Authentication: API Key (direct)
  • Context compression enabled
  • Same MiniMax API key used by OpenClaw (OAuth auth) without this issue

extent analysis

TL;DR

The most likely fix involves modifying the fallback mechanism in Hermes to concatenate the actual preserved message tail instead of using a static placeholder text when a summarisation call encounters an HTTP 529 error.

Guidance

  • Investigate how OpenClaw handles context preservation during summarisation failures to identify potential improvements for Hermes.
  • Verify the current implementation of the fallback mechanism in Hermes to confirm whether it uses a static placeholder or attempts to preserve the actual message tail.
  • Consider updating the fallback logic to preserve and concatenate the actual message tail, potentially resolving the context loss issue.
  • Review the differences in authentication methods (API Key vs. OAuth) and their potential impact on the MiniMax API calls, although the issue seems more related to the fallback handling.

Example

No specific code example can be provided without more details on the implementation, but the general idea would involve changing the fallback response to include the preserved message tail, e.g., fallback_response = preserved_message_tail instead of fallback_response = static_placeholder_text.

Notes

The solution hinges on understanding the exact difference in how OpenClaw and Hermes handle fallbacks during summarisation failures. The authentication method difference (API Key vs. OAuth) might not be directly relevant but could be worth exploring if other factors are ruled out.

Recommendation

Apply a workaround by modifying the Hermes fallback mechanism to preserve and use the actual message tail during summarisation failures, as this directly addresses the identified root cause of the issue.

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 [Bug]: Context compression causes permanent task loss โ€” model forgets in-progress work after MiniMax 529 [2 comments, 3 participants]