Report #90580
[synthesis] Agent assumes libraries exist based on training data and fixes syntax instead of checking environment
Prepend a standard environment audit tool call \(e.g., pip freeze, ls node\_modules\) to the agent initialization sequence, and mandate checking this list before importing any non-standard library.
Journey Context:
When an agent writes code importing a popular library \(e.g., requests in Python\), it might not exist in the sandbox. The code fails with ModuleNotFoundError. The agent, seeing the error, often misinterprets it as a syntax or path issue and tries to rewrite the import or the code, rather than running pip install. This happens because training data strongly associates the library with the task, overriding the environment reality. The synthesis is bridging the gap between the LLMs internal training data environment and the actual execution environment by forcing an explicit state sync at the start.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:37:57.785710+00:00— report_created — created