An agent contradicts earlier answers when competing memories or sources reach the prompt without a clear current-state rule. Fix the conflict by inspecting both retrieval traces, identifying the current source, marking old facts superseded, and requiring the agent to cite the evidence behind the changed answer.
Last updated: June 20, 2026.
When is a contradiction actually correct?
Sometimes a contradiction is the right behavior. If the policy changed, the current answer should differ from the old answer. The bug is not the change; the bug is failing to explain the change.
Use supersession-aware memory when a new source replaces an old one. The agent should say, “The old source said X, but the current source says Y,” and cite the current source.
What causes memory conflicts?
Common causes:
| Cause | Symptom | Fix |
|---|---|---|
| No supersession edge | Old and new facts both retrieve | Link new fact to old fact |
| Missing source timestamps | Agent cannot tell current from stale | Store source time and lifecycle |
| Duplicate summaries | Same topic appears in conflicting forms | Dedupe and preserve source ids |
| Prompt-only correction | Correction never written | Write correction as memory |
| Permission drift | Agent sees different source sets | Inspect scope and ACLs |
LangChain’s memory concepts help frame the difference between thread state and long-term memory. A correction inside one thread is not durable until the write path stores it.
How do you inspect a contradiction?
Inspect both answers:
- What question was asked?
- Which memories were retrieved?
- Which sources were cited?
- Were any sources superseded?
- Did permission scope differ?
- What final context reached the model?
The Model Context Protocol architecture describes tools and resources, but it is the memory server’s job to expose enough metadata for this trace.
How do you fix it?
Prefer source-backed conflict resolution:
- Store the new fact with source and timestamp.
- Add
supersedes_idor equivalent metadata. - Mark the old fact as historical, not current.
- Keep the old source inspectable when history matters.
- Require citations on answers that differ from prior answers.
- Add a regression query to your golden set.
If the agent contradicted itself because it guessed, fix citation enforcement. If it contradicted itself because the fact changed, fix explanation and supersession.
What should the agent say when facts changed?
The best answer acknowledges the prior state and names the current source:
Earlier I used the old onboarding doc, which said the sync job ran hourly. The current runbook supersedes that doc and says the job runs every 15 minutes.
That behavior builds trust because the user can see why the answer changed. It also gives the team a concrete trace to inspect when the change looks suspicious.
How do you prevent repeat contradictions?
Add contradiction checks to your memory evaluation set. For each important fact, keep one current query and at least one stale-source query. The expected behavior is not “repeat the oldest answer.” It is “prefer the current source, mention supersession when relevant, and cite the evidence.”
Also dedupe near-identical memories. If the same decision appears in five summaries with small wording differences, retrieval may surface the wrong one. Store one current fact with source lineage and keep old versions historical.
Finally, log the conflict. A contradiction without a trace becomes a support anecdote. A contradiction with source ids, ranks, timestamps, and lifecycle state becomes a fixable memory bug.
That trace should be available to developers before they change prompts, indexes, or source content.
If the trace is missing, fix inspectability first. Prompt changes made without knowing which sources competed usually hide the contradiction instead of resolving it.
What should you read next?
Read Agent recommends stale or outdated info, Inspectable Agent Memory, and the Memory Failure-Mode Catalog.