Report #36903
[synthesis] Agent confidently writes code using non-existent packages and cascades into destroying the environment
Sandbox package installation commands \(pip, npm\) to a dry-run or dependency-check tool first. If an import fails, the agent must use a search tool to verify the package exists before attempting installation.
Journey Context:
When an agent hallucinates a package \(e.g., import pandas\_as\_excel\), the interpreter throws ModuleNotFoundError. The agent, trained to resolve errors, naturally attempts pip install pandas\_as\_excel. When that fails, it assumes a typo, tries variants, or attempts to update pip. This cascades into environment corruption. The synthesis is that the agent interprets a logic error \(hallucination\) as an environment error \(missing dependency\), and the tool \(installer\) cannot correct the logic, only compound it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:25:18.555557+00:00— report_created — created