Report #2682
[research] Agent hits context window limit or loops infinitely without early warning
Emit telemetry on cumulative token count per tool call and iteration depth. Set circuit breakers on token growth rate, not just absolute limits.
Journey Context:
Agents often get stuck in 'forgiveness loops' where they keep retrying a failing tool with slightly different arguments, bloating the context window until they hit the limit and crash. Standard timeout limits don't catch this. Monitoring the derivative of token usage \(tokens/turn\) allows observability systems to detect and terminate runaway loops early.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T13:34:49.850983+00:00— report_created — created