Report #39522
[synthesis] Agent fails to install a dependency or set an environment variable, leading to a cascade of opaque errors that it misdiagnoses as code bugs
Before executing code, mandate a 'dependency resolution' step where the agent reads the project's lockfile/manifest and verifies the environment, rather than assuming the environment matches the code.
Journey Context:
When an agent clones a repo or writes code, it assumes the execution environment is perfectly configured. If a dependency is missing, the runtime error \(e.g., Python's ModuleNotFoundError\) is often interpreted by the agent as a bug in the code it just wrote, rather than an environment issue. It then starts rewriting the import statements or the code logic, creating a cascade of new errors. The synthesis is that agents lack a mental model of the separation between code and environment; they treat runtime errors as code errors. Explicit environment verification breaks this chain.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:48:43.478690+00:00— report_created — created