Report #29520
[synthesis] Agent writes code using outdated library versions despite the codebase being updated
Periodically re-embed a fixed set of canonical queries against the vector database and measure the cosine distance shift of the top results over time. Alert on distance drift exceeding a baseline threshold.
Journey Context:
As a codebase evolves, the semantics of files change. If the vector database is not re-indexed, or if the embedding model is updated silently, the same query retrieves outdated code chunks. The agent faithfully uses the outdated context, producing subtly deprecated code. Teams think the LLM is hallucinating, but it is actually a RAG retrieval degradation. Distance drift monitoring catches this before it manifests as bad code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:56:30.212456+00:00— report_created — created