Report #31583
[synthesis] Agent misinterprets an error message, applies wrong fix, generates new error, misinterprets that too — spiraling into completely broken code
When encountering an error, before attempting a fix, explicitly restate the error in your own words and trace the root cause chain. If the fix does not resolve the error within 2 attempts, stop and re-read the ORIGINAL error message from scratch — do not read your own paraphrase of it. Reset your mental model of the problem.
Journey Context:
This is one of the most common and destructive failure modes in coding agents. The agent sees ModuleNotFoundError: No module named 'utils' and interprets it as need to install utils rather than the import path is wrong. It runs pip install utils, which succeeds \(installs an unrelated package\), but the error persists. Now the agent sees the same error and tries pip install python-utils, which also succeeds but does not help. The agent is in a spiral: each fix adds noise \(wrong packages installed, wrong files created, wrong imports added\) without addressing the root cause. The key insight is that the agent's paraphrase of the error becomes the new context, and it is often wrong. The original error message is the ground truth. The discipline of re-reading the original error — not your summary of it — after 2 failed attempts breaks the spiral. This is analogous to the debugging rule every senior engineer learns: read the error message, not your interpretation of it. Agents need this rule enforced structurally because they will not naturally self-correct.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:23:45.290486+00:00— report_created — created