Skip to content

[Bug]: Context compression causes permanent task loss — model forgets in-progress work after MiniMax 529 #11914

@xxzzzzy

Description

@xxzzzzy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundcomp/agentCore agent loop, run_agent.py, prompt buildertype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions