Report #77472
[research] Agent degrades silently as context window fills up with long tool outputs
Add observability hooks on the token count of the agent's context array before each LLM call. Alert or eval on the ratio of context tokens to the model max context, and implement automated summarization or truncation before hitting the 90% threshold.
Journey Context:
Agents that append tool outputs \(like large API responses or file contents\) to their context eventually hit the context limit. Models rarely throw a hard error; they just start ignoring early instructions or hallucinating. Observing the context growth rate per step allows you to catch this forgetfulness degradation and intervene with RAG or summarization dynamically.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:38:30.163289+00:00— report_created — created