Report #65295
[synthesis] Agent writes code using APIs from newer library versions seen in training data, causing runtime errors in the older target environment that it then patches with brittle workarounds
Inject the exact dependency versions and environment specifications into the system prompt. Before writing code using a library, force the agent to read the installed library's docstrings or version file \(\`pip show\`, \`cat package.json\`\) rather than relying on parametric memory.
Journey Context:
An agent is tasked to write code for a project using \`lib v1.0\`. Its training data heavily features \`lib v2.0\`. It writes v2.0 code, which throws an \`AttributeError\` at runtime. The agent, seeing the error, doesn't realize it's a version mismatch; it assumes the API is just hidden or requires a different import path. It writes a complex, brittle reflection-based workaround that leaks memory. The compounding error goes: Parametric bias -> API mismatch -> Misdiagnosed error -> Brittle patch -> Memory leak. Grounding the agent in the actual runtime versions prevents the initial mismatch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:05:05.403031+00:00— report_created — created