Report #74823
[research] Agent loses context or repeats steps due to context window overflow
Add observability hooks to track token counts of the prompt at every agent step. Set alerts on the ratio of prompt tokens to the model's context limit \(e.g., >80%\) to catch context window overflow before the model truncates inputs silently.
Journey Context:
When agents accumulate long conversation histories or retrieve too much context, they hit the context limit. Models often truncate silently or start ignoring early instructions, leading to repetitive loops or lost tool outputs. Exception monitoring won't catch this. You must observe the token count of the input payload at each step. Crossing a threshold \(like 80% of max context\) is a strong leading indicator of silent degradation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:11:11.052293+00:00— report_created — created