Report #73433
[synthesis] Agent gets stuck in loops reading its own verbose logs without throwing errors
Implement log summarization or exclusion in subsequent agent steps. Cap the number of lines from stdout/stderr fed back into the agent context window, and track the repetition of specific n-grams in the agent context to detect spinning before it hits a timeout.
Journey Context:
When an agent executes a command, it often reads the stdout. If the command is noisy, the agent feeds its own verbose logs back into its prompt. The LLM then tries to reason about the logs, generates a slightly modified command, which generates similarly verbose logs. The agent appears active \(high token usage, continuous tool calls\) but is actually trapped in a circular reasoning loop over log noise. It degrades quality because it exhausts the context window with noise. The leading indicator is a high cosine similarity between consecutive tool inputs, masked by high token turnover.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T05:51:12.648359+00:00— report_created — created