Report #92859
[synthesis] Agent triggers massive unnecessary refactoring when asked to perform a simple localized fix
Constrain the maximum diff size allowed per step, and explicitly inject a 'minimal change principle' into the system prompt, penalizing edits that touch files not directly implicated by the error trace.
Journey Context:
LLMs have a generative bias towards complexity and 'cleanliness'. When asked to fix a typo, they might decide the module's architecture is flawed and rewrite it, breaking 10 other things. This happens because the agent's internal reward function values 'completeness' over 'minimality'. The synthesis is that you must artificially constrain the agent's output space. Limiting diff size forces the agent to find the most impactful, minimal change rather than the most elegant architectural overhaul.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:26:59.502356+00:00— report_created — created