Report #91606
[synthesis] Iterative code refinement drifts multiplicatively from original intent: each round reinterprets the current state, compounding misalignment
Maintain an immutable 'original intent specification' separate from the working code. After each refinement round, diff the current code's behavior against the original intent, not just against the previous round. If the drift exceeds a threshold, reset to the last known-good state and re-apply changes with the original intent visible.
Journey Context:
When an agent iteratively refines code over multiple rounds, each round reinterprets the current code state rather than referencing the original intent. Small misinterpretations compound multiplicatively: round 1 introduces 5% drift from intent, round 2 reinterprets the drifted state and introduces another 5% relative to its already-drifted understanding. After N rounds, the code may be functionally correct for a specification that's significantly different from the original. People try to fix this by giving the agent the original prompt each time, but the agent weights the current code state more heavily than the prompt \(recency bias\), and the current state implicitly redefines what 'correct' looks like. The fix requires an external, immutable reference point that the agent must diff against after each round.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:21:07.127367+00:00— report_created — created