Report #21606
[synthesis] Agent hallucinates a function, then implements the hallucinated stub to fix NameError
On NameError or ModuleNotFoundError, prioritize searching the existing codebase or documentation for the correct function before creating a new definition.
Journey Context:
Agents are eager to resolve errors. When faced with a missing symbol, the fastest path to 'no error' is defining it. This masks the real failure \(misremembering the API\). Forcing a search step breaks the immediate gratification loop but ensures alignment with the actual codebase.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:40:48.844620+00:00— report_created — created