MoA Reference Models Silently Degrade on Context Overflow

Bug tracker — July 7, 2026. Hermes bug #60345 exposes a dangerous asymmetry inside Mixture of Agents: the aggregator is protected by context compression, but reference models are not. As conversations grow, references can fail first, disappear silently, and leave the user with degraded output quality and no visible warning.

Why This Bug Matters

MoA is marketed as a quality amplifier: multiple reference models contribute reasoning and an aggregate model synthesizes the final answer. But in this failure mode, the system can lose one or more references while continuing the turn as if nothing happened. The user does not see an error banner, a warning badge, or any UI event telling them a reference vanished. The result looks normal while the underlying model ensemble has already degraded.

The Core Asymmetry

ComponentContext ProtectionWhat Happens on Overflow
Aggregator modelProtected by ContextCompressorHistory is trimmed before the window is exceeded
Reference modelsNo equivalent protectionFull history is sent, provider returns HTTP 400, failure is collapsed into a failed label

This means smaller-window references can degrade first, invisibly, long before the aggregate model fails.

Source-Verified Failure Chain

api_messages (full history)
→ _reference_messages()      # moa_loop.py:373 — NO trim against context window
→ _run_reference()           # moa_loop.py:176-277 — NO pre-flight token estimation
→ call_llm()                 # auxiliary_client.py:5811 — no trim / truncate protection
→ provider API               # overflows → HTTP 400 → caught → [failed: ...] label

The standout detail is not merely that the provider rejects the request. It is that the harness converts the failure into a quiet internal label while the MoA turn proceeds with fewer references.

API-Verified Boundary Test

Reference ModelPrompt SizeObserved Result
ollama-cloud:kimi-k2.7-code~250K tokensHTTP 200, normal response
ollama-cloud:kimi-k2.7-code~270K tokensHTTP 400 hard reject, no silent provider-side truncation

That test rules out the comforting theory that the provider might silently truncate the request. It does not. The request fails hard, and Hermes silently papers over the loss.

Why Review-Site Readers Should Care

Fix Paths Proposed by the Reporter

  1. Trim reference history to fit — parity with the aggregator via a context-compression step for references.
  2. Surface failure to the user — emit an explicit moa.reference_failed event or equivalent UI signal.
  3. Prefer both — trim when possible, and surface the failure when trimming still cannot save the request.

Part of a Larger Context-Degradation Pattern

IssueDatePattern
#50807Jun 22Very large shell output forwarded without bounding
#57275Jun 29Agent always exceeds context limits
#58327Jul 4Context compression breaks tool message chain on DeepSeek
#60345Jul 7MoA references silently lost to context overflow with no signal

This is not an isolated bug. It fits a broader Hermes pattern where context-boundary handling fails in ways that are either invisible or structurally misleading.

Case Summary

Source URL: https://github.com/NousResearch/hermes-agent/issues/60345