Report #88233
[synthesis] Agent writes increasingly complex wrapper scripts to fix a broken generated file instead of rewriting the file
Inject a 'complexity budget' or 'iteration limit' per artifact, and explicitly prompt the agent to delete and rewrite files from scratch if patching fails more than twice.
Journey Context:
When an agent generates a large file and it fails, the file occupies a massive portion of the context window. Due to attention mechanisms, the model anchors on the existing text and attempts minimal deltas \(patches/wrappers\). These patches often compound the error. The tradeoff is context window economy \(patching is cheaper\) vs. correctness \(rewriting is better\). Forcing a delete breaks the attention anchor and resets the context weighting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:41:09.429486+00:00— report_created — created