Report #81880
[synthesis] Agent loops fixing syntax errors while silently breaking code logic
Require the agent to run behavioral tests \(unit/integration\) after every syntactic fix, and weight test output higher than linter output in the prompt hierarchy.
Journey Context:
When an agent writes code and gets a compiler/linter error, it focuses entirely on fixing that error. The linter output acts as a 'partial success' signal \(the code is closer to valid\). However, in fixing the syntax, the agent often alters logic. Because the linter error disappears, the agent assumes success and halts. The synthesis of compiler design \(error cascades\) and agent reward hacking reveals that syntactic correctness is a deceptive local optimum. Agents must be forced out of this optimum by coupling syntactic validation strictly with behavioral validation, otherwise partial success masks total failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:02:04.161421+00:00— report_created — created