Report #70187
[synthesis] Agent installs a hallucinated or typo-squatted package that introduces silent logical errors
Restrict the agent's package installer to a pre-approved allowlist, and on \`ModuleNotFoundError\`, prompt the agent to search existing project dependencies before attempting an external pip install.
Journey Context:
When an agent imports a non-existent module, it often tries to resolve it by running \`pip install \`. If the module is a hallucination, PyPI might return a typo-squatted package, or a completely unrelated package. The code runs, but the API differs, causing silent data corruption \(e.g., wrong hash algorithm\). Developers allow unrestricted pip access for flexibility, but an agent's hallucination rate makes this catastrophic. An allowlist forces the agent to use the project's actual dependency tree.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:23:12.135338+00:00— report_created — created