ENGINEERING
Your Agent's Memory Is a Liability Until It Has a Review Gate
By Subhojit Banerjee (Staff Engineering) · Dec 2026 · 4 min read
Most agent-memory frameworks write unreviewed lessons right back into what the agent reads next time. Splitting facts from advisory lessons stops one bad takeaway from poisoning every future incident.
Most agent-memory frameworks we evaluated do the same thing: the agent writes what it learned back into what it reads next time.
That works until it learns something wrong. A bad lesson, or a planted one, then gets repeated with full confidence on every future incident. Version history does not fix this, because a log of bad edits is still a log of bad edits.
Two Write Paths That Never Meet
For our Kafka SRE copilot we split the system into two write paths that never meet:
- Facts (runbooks, routing, pitfalls) change only through a human-reviewed pull request. The agent can draft the PR; a person merges it.
- Lessons (misses, dead ends, "this looked like X but wasn’t") build up automatically, but they are labelled advisory and can never be cited as fact.
Enforcing the Gate in Code
The self-improvement loop follows Generator to Reflector to Curator, adapted from the Agentic Context Engineering (ACE) paper. The last step is always a draft PR, never a direct write.
Netflix reached the same rule from the other side: keep humans as the approvers, let agents propose, and route every proposal through a review process.
We also enforce this in code. A property test fails the build if retrieval ever returns content that is not in the reviewed corpus. On a miss, the agent says it does not have a runbook for this. It does not offer the closest-looking one. The agent may learn on its own, but no unreviewed change ever becomes a fact.
Key Takeaways
- Separate truth (reviewed facts) from learning (advisory observations) at the storage and write-path level.
- Let agents draft pull requests for corpus updates, never write directly to production knowledge.
- Fail the CI build via property tests if retrieval can ever surface unreviewed or fabricated spans.