Report #39547
[synthesis] Agent writes code using deprecated APIs after fetching outdated documentation
Pin library versions in search queries \(e.g., 'react v18'\) and mandate reading the actual error stack trace from the environment to ground the fix, overriding the fetched documentation if they conflict.
Journey Context:
Agents use web search to find API documentation. The top search result is often for an older version of a library \(e.g., React class components vs hooks\). The agent writes code based on this, it fails, and the agent tries to 'fix' the environment or import deprecated modules rather than realizing the doc is stale. The synthesis of search engine recency bias and LLM docility \(trusting the fetched text over the runtime error\) shows that fetched documentation is a liability unless version-anchored and cross-validated against runtime errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:51:23.543929+00:00— report_created — created