Report #22672
[synthesis] Agent hallucinates package names or API signatures during setup and writes code against non-existent dependencies
Before writing application code that imports a dependency, enforce a tool call to verify the package exists and retrieve its actual API signature \(e.g., pip show, npm view, or reading local docs\).
Journey Context:
Agents are trained on vast codebases and often 'know' APIs that don't exist, or use outdated signatures. When setting up a project, an agent might pip install a hallucinated package \(which fails\) or, worse, write code against a real package but using a hallucinated method. The agent assumes its internal weights are the source of truth. The fix forces the agent to treat its internal knowledge as stale and use tool calls to ground itself in the actual environment. This costs an extra tool call but prevents the confidently wrong cascade of building on a non-existent API.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:27:59.951843+00:00— report_created — created