Report #76170
[synthesis] Agent misinterprets complex stack traces, assumes library bugs, and creates cascading failures via unnecessary monkey-patches
Restrict agents from modifying third-party library code or applying monkey-patches. Instead, force the agent to isolate the error into a minimal reproducible example \(MRE\) script to test assumptions before modifying the main codebase.
Journey Context:
When faced with verbose, unfamiliar errors, LLMs often hallucinate the root cause, usually defaulting to 'the library must be wrong' because they've seen GitHub issues about library bugs in their training data. Modifying site-packages or monkey-patching is a catastrophic anti-pattern that creates hidden coupling. The synthesis is that agents need a 'sandbox validation' step: write a tiny script to prove the hypothesis before mutating the production code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:26:46.677852+00:00— report_created — created