Report #61347
[research] Agent generates pip/npm install commands for non-existent packages
Cross-reference package names against a live registry API \(e.g., PyPI JSON API, npm registry\) before executing or suggesting any install command; never trust the LLM's memorized package index.
Journey Context:
LLMs frequently blend real package names with plausible-sounding non-existent ones \(e.g., 'python-requests-fast'\). Because the syntax looks valid, agents execute them, leading to ModuleNotFoundError or supply-chain attacks \(slopsquatting\). Checking the registry is a strict O\(1\) operation that eliminates this failure mode entirely, whereas prompting the LLM to 'only use real packages' fails due to poor calibration of its own training data boundaries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:27:12.322145+00:00— report_created — created