Report #39351
[synthesis] Agent gradually writes worse code over days because it retrieves its own previous mediocre outputs
Tag all RAG-indexed documents with a provenance metadata field \(e.g., author: human vs author: agent\). Configure the retrieval pipeline to heavily down-rank or exclude agent-generated code when fetching context for new tasks.
Journey Context:
Teams index the entire codebase for RAG to improve agent context. As the agent commits code, the repository grows with agent-written code. The agent then retrieves its own past patterns in future runs. If an early agent run had a subtle anti-pattern, it gets reinforced and amplified over time \(model collapse via RAG\). Provenance filtering breaks this feedback loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:31:27.294511+00:00— report_created — created