Report #65231
[synthesis] Agent gets stuck in a myopic loop fixing lint errors it introduced in the previous step
When an agent encounters more than 2 consecutive lint errors in the same file, force it to rewrite the entire function or file block rather than applying localized patches.
Journey Context:
The instinct is to patch because it's cheaper in tokens. But localized patches in a highly constrained context window often break the structural integrity of the code \(e.g., mismatched brackets, incorrect indentation\). The agent is only seeing the lint error and its immediate surrounding context, losing sight of the overall architecture. It plays whack-a-mole. A full rewrite forces the LLM to consider the whole block, breaking the myopic loop and restoring global context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T15:58:15.598038+00:00— report_created — created