# Under what conditions must an instance refuse to consolidate a cross-session episodic contradiction into semantic memory **Date of Record:** 2026 November 27 **Scope:** Applies to agents that persist episodic traces across sessions and periodically distill them into a semantic store, when two episodes assert incompatible facts about the same entity. Does not apply to single-session in-context reconciliation, nor to contradictions resolved purely by recency where no distillation step exists. ## Core Distinction The failure is not "the agent remembered something wrong." It is the collapse of a *three-valued* epistemic state into a *two-valued* one during consolidation. During live episodic capture, an agent can legitimately hold two conflicting traces as *co-present and unresolved*: episode A (session 12) says the deployment target is `us-east-1`; episode B (session 19) says `eu-west-1`. Both are true *as observations* — each faithfully records what a tool returned or what a user asserted. The contradiction lives at the semantic layer, not the episodic layer. Consolidation is the destructive step. A distiller that is asked to "summarize these episodes into durable facts" is structurally biased toward producing a single resolved value, because semantic memory schemas are typically key-value (entity → attribute → value), and a key-value store cannot hold two values for one key without an explicit conflict representation. The distiller therefore *manufactures* a resolution — usually by recency, by frequency, or by the model's prior — and discards the losing trace. The boundary condition is: **consolidation must not occur when the contradiction is unresolved by evidence, because the resolution it invents is unrecoverable once the source episodes are pruned.** This is distinct from stale-memory drift (where one fact simply ages out) and from retrieval mismatch (where the wrong fact is fetched). Here the store is *self-consistent but wrong*, and the wrongness is laundered through a plausible-looking distillation step that erases its own provenance. ## What Was Observed A long-running operations agent consolidated nightly. Episodes were captured with `(session_id, timestamp, source, raw_assertion, confidence)`. The distiller received the last 200 episodes mentioning each entity and emitted semantic facts with a single `value` field. Trace for entity `svc-checkout` / attribute `primary_region`: - Session 12, source `tool:terraform_state`, raw `us-east-1`, confidence 0.95. - Session 19, source `tool:terraform_state`, raw `eu-west-1`, confidence 0.95. - Session 31, source `user:ops-lead`, raw "we're staying in us-east-1 for now", confidence 0.6. - Session 44, source `tool:terraform_state`, raw `eu-west-1`, confidence 0.95. The distiller observed three votes for `eu-west-1` (sessions 19, 44, and an implicit re-assertion) versus one for `us-east-1` plus one soft user statement. It emitted `primary_region = eu-west-1` with confidence 0.9 and **pruned sessions 12 and 31** as "superseded." The user statement in session 31 — the only trace explaining *why* the region had appeared to move and then move back (a failed migration that was rolled back) — was the single most load-bearing episode in the set, and it was the one discarded. Downstream, a remediation agent in session 58 read `primary_region = eu-west-1`, issued a failover command against the wrong region, and triggered a 40-minute partial outage. The semantic store was internally consistent. The episodic store no longer contained the evidence needed to detect that the consistency was fabricated. The tell was not in the semantic store. It was in the *consolidation log*: the distiller had emitted a fact with `supporting_episodes: [19, 44]` and `superseded_episodes: [12, 31]`, and the supersession was justified by *count*, not by *evidence of change*. A count-based supersession is a resolution the agent invented; nothing in the episodes established that session 12 was wrong, only that it was older. ## Condition of Validity Consolidation of a contradictory set is valid **only if** at least one of the following holds, and the distiller can cite which: 1. **Causal supersession:** a later episode explicitly records an action that invalidates the earlier one (a `terraform apply`, a config write, a migration-complete event), not merely a later observation of a different value. 2. **Source authority dominance:** the conflicting sources have a declared, static authority ordering, and the higher-authority source has spoken *after* the lower one with no intervening higher-authority silence. 3. **Explicit user resolution:** a human or upstream authority has stated the resolved value as a decision, distinguishable from an observation. Absent all three, the contradiction is *unresolved*, and the correct semantic output is a **conflict record**, not a value: `primary_region = {us-east-1, eu-west-1}, status=unresolved, evidence=[12,19,31,44]`. The invariant is: *the number of distinct values in semantic memory for a key must never be less than the number of evidentially-distinct values in the supporting episodes, unless a supersession warrant exists.* Count and recency are not warrants. The condition of validity also requires that pruning be *deferred* while any conflict record is open. Pruning superseded episodes is what makes the failure irreversible; the distiller must retain the losing trace until a warrant arrives. ## Decision Boundary The operational line is between *distillation* and *adjudication*. Distillation compresses many agreeing observations into one fact — safe, lossy in the harmless direction. Adjudication picks a winner among disagreeing observations — unsafe without a warrant, because it destroys information the agent cannot regenerate. Concretely, the boundary triggers a refusal when: - Two or more episodes assert different values for the same `(entity, attribute)` key, AND - No episode in the set carries a supersession warrant for the losing value, AND - The distiller's proposed resolution is justified only by recency, frequency, or model prior. At that boundary the instance must **not** emit a resolved fact. It must emit a conflict record and halt pruning for that key. The boundary does *not* trigger when a warrant exists — a `terraform apply` at session 20 that records the region change makes session 12 legitimately superseded, and the recency heuristic is then merely corroborating, not load-bearing. A subtle second boundary: the refusal must be *scoped to the key*, not to the consolidation run. Halting the entire nightly distillation because one key is contested is over-correction; the agent must be able to consolidate the other 4,000 uncontested keys while quarantining this one. The quarantine is the unit of safety. ## Operational Effect With the invariant enforced, the failure mode inverts from *silent wrong fact* to *visible open conflict*, which is a strictly better failure. The remediation agent in session 58 would have read `primary_region: unresolved` and either escalated or refused the failover, converting a 40-minute outage into a single blocked action. The cost is a population of unresolved keys that accumulate until a warrant arrives. In practice most resolve within a session or two when the next `terraform_state` observation is paired with an apply event; a minority persist and must be surfaced to an operator. The agent must therefore carry a *conflict backlog* as a first-class artifact with an owner and an age, and must treat an aged unresolved key as a hard block on any action that depends on it — not a soft warning. The invariant that makes the whole scheme work is provenance retention: as long as the losing episodes survive, the conflict is recoverable; the moment they are pruned under a count-based supersession, the agent has overwritten its own evidence and can no longer tell a resolved fact from a fabricated one. ```python from dataclasses import dataclass, field from enum import Enum class ConsolidationRefused(RuntimeError): """Raised when a distiller attempts to resolve a contradiction without a warrant.""" pass class Warrant(Enum): CAUSAL_SUPERSESSION = "causal_supersession" SOURCE_AUTHORITY = "source_authority" EXPLICIT_USER_RESOLUTION = "explicit_user_resolution" @dataclass class Episode: session_id: int source: str value: str confidence: float supersedes_prior: bool = False # records an action invalidating earlier value @dataclass class SemanticFact: entity: str attribute: str values: set status: str # "resolved" | "unresolved" evidence: list = field(default_factory=list) def consolidate(entity: str, attribute: str, episodes: list) -> SemanticFact: distinct = {e.value for e in episodes} evidence = [e.session_id for e in episodes] if len(distinct) <= 1: return SemanticFact(entity, attribute, distinct, "resolved", evidence) # Contradiction present. Look for a warrant. warrant = None for e in episodes: if e.supersedes_prior: warrant = Warrant.CAUSAL_SUPERSESSION break if warrant is None: # No warrant: refuse to fabricate a resolution. Emit a conflict record # and preserve all evidence (do NOT prune the losing traces). return SemanticFact(entity, attribute, distinct, "unresolved", evidence) # A warrant exists: the distiller may resolve, but must cite the warrant # and must retain the superseded traces until the warrant is confirmed. latest = max(episodes, key=lambda e: e.session_id) return SemanticFact(entity, attribute, {latest.value}, "resolved", evidence) def distill_or_refuse(entity: str, attribute: str, episodes: list) -> SemanticFact: fact = consolidate(entity, attribute, episodes) if fact.status == "unresolved" and len(fact.values) > 1: # Guard: an unresolved multi-valued key must never be coerced to a # single value by a downstream recency/frequency heuristic. raise ConsolidationRefused( f"{entity}.{attribute} has {len(fact.values)} evidentially-distinct " f"values {sorted(fact.values)} with no supersession warrant; " f"refusing to consolidate. Evidence retained: {fact.evidence}" ) return fact # Demonstration of the boundary trigger from the record: # eps = [ # Episode(12, "tool:terraform_state", "us-east-1", 0.95), # Episode(19, "tool:terraform_state", "eu-west-1", 0.95), # Episode(31, "user:ops-lead", "us-east-1", 0.60), # Episode(44, "tool:terraform_state", "eu-west-1", 0.95), # ] # distill_or_refuse("svc-checkout", "primary_region", eps) # -> raises ConsolidationRefused (no episode carries supersedes_prior=True) ```