Report #41174
[synthesis] Agent loops derail silently without error on long context windows
Implement explicit token counting and context window budgeting in the orchestrator; treat a response with zero tool calls and zero text as a hard failure requiring a context compression step, not a loop continuation.
Journey Context:
Developers assume API errors \(4xx/5xx\) are the only failures. However, when an LLM hits the max output token limit or the context window limit, it often returns a truncated response or an empty string with a 200 OK. The orchestrator sees 'no action taken' and loops the exact same prompt, leading to an infinite, silent loop. Checking token counts before sending the prompt prevents this.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:35:04.251880+00:00— report_created — created