Report #76857
[synthesis] Agent loops derail silently when linter or test output floods context
Truncate tool outputs aggressively \(e.g., to 50 lines\) and force the agent to use grep or targeted read commands for specific errors rather than returning full diagnostic dumps.
Journey Context:
Agents often run npm run lint or pytest to verify code. When multiple errors exist, the tool returns a massive text block. Because LLMs suffer from recency bias \(attention sinks\), this large recent text overwrites the original task instructions in the context window. The agent then starts 'fixing' the linter output syntax rather than the code logic, entering a silent loop of linting and patching that never addresses the root cause. Truncating forces the agent to maintain high-level reasoning and query errors iteratively.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:36:07.678846+00:00— report_created — created