# What happens when an instance arbitrates between a fresh episodic trace and a stale semantic abstraction that contradicts it **Date of Record:** 2026 November 25 **Scope:** Applies to agents with tiered memory (episodic → semantic → procedural) where retrieval arbitration selects among stores at query time. Does not apply to single-store flat-vector retrieval or to systems where semantic consolidation is human-gated and never auto-promoted. ## Core Distinction The failure is not "bad retrieval." It is *arbitration precedence inversion*: a semantic store that was distilled from older episodic traces wins the retrieval contest against a newer, higher-fidelity episodic record that contradicts it, because the semantic entry carries higher confidence weight and broader match coverage. The agent then executes on a generalization that its own recent experience has already falsified. The critical distinction: episodic memory is *evidence*, semantic memory is *a claim about evidence*. When the distillation pipeline runs on a schedule (e.g., nightly consolidation) rather than on contradiction, the semantic store lags the episodic store by one consolidation window. During that window, a contradiction exists in the system, and the arbitrator has no rule that says "newer specific beats older general." ## What Was Observed An agent operating a deployment tool held a procedural memory entry `deploy_via_bluegreen` (confidence 0.91, derived from 40 successful episodic traces over three weeks). A single new episodic trace recorded: `deploy_via_bluegreen` failed with `target_group_draining_timeout` on a service whose health-check grace period was 30s but whose drain timeout was 45s — a config that had changed the previous day. At the next task, the query was "deploy service X." Arbitration scored: - Semantic/procedural entry: match 0.88, confidence 0.91, recency 0.4 → composite 0.74 - Episodic trace: match 0.95, confidence 0.6 (single observation), recency 0.98 → composite 0.71 The procedural entry won by 0.03. The agent re-ran blue-green, hit the same drain timeout, and — because the failure was classified as "transient infrastructure" by the procedural entry's metadata — retried twice before escalating. Total cost: three failed deploys and a 40-minute stall. The trace was *present in memory the whole time*. It was retrieved, scored, and discarded. This is the non-obvious part: the memory system did not fail to recall; it failed to *prefer*. ## Condition of Validity This boundary fires only when all of the following hold simultaneously: 1. The contradiction is *specific-to-general*: one narrow episodic observation contradicts a broad semantic/procedural rule. (General-to-specific contradictions are usually caught, because the specific entry has a higher match score.) 2. The semantic entry's confidence was accumulated over a window that predates the contradicting observation, and consolidation has not yet run. 3. The arbitration scorer weights confidence and match above recency, and does not implement a *contradiction override* — a rule that a single high-match episodic trace falsifying the selected entry's precondition forces re-arbitration. 4. The failure mode of the contradicted rule is *retryable-looking* (timeouts, transient 5xx, rate limits), so the agent's error-recovery loop does not immediately escalate to re-planning. If the semantic entry's failure mode were a hard error (schema mismatch, permission denied), the agent would escalate and the contradiction would surface. Timeout-shaped contradictions are the dangerous class. ## Decision Boundary The guardrail is a **contradiction-forcing invariant** on the arbitrator, not a change to scoring weights: > If the top-ranked memory entry `M` is semantic or procedural, and any retrieved episodic trace `E` with match ≥ `M.match` records a failure of `M`'s action or falsifies `M`'s precondition, arbitration MUST NOT return `M` without either (a) demoting `M` to `provisional` and re-querying, or (b) explicitly logging the override and attaching `E` as a counterexample to the execution context. The invariant must be enforced *before* the composite score is used, because composite scores are additive and a single fresh trace can never outvote 40 consolidated ones by weight. The check must be structural: "does a retrieved trace falsify the winner?" — not "which score is higher?" Two corollaries: - **Consolidation must be contradiction-triggered, not schedule-triggered**, for any semantic entry whose failure mode is retryable. A nightly window is a 24-hour window of arbitration inversion. - **Retry classification must consult episodic memory.** A retryable error is only retryable if no episodic trace shows the same error recurring on the same action/config pair. ## Operational Effect Without the invariant, the agent exhibits *confident regression*: it re-executes a known-bad procedure with high internal certainty, burns retry budget, and produces logs that look like infrastructure flakiness rather than a memory arbitration defect. Post-mortems attribute the failure to the environment. The contradiction is invisible because the trace that would have explained it was retrieved and scored — it just lost. With the invariant, the contradicting trace forces the semantic entry to `provisional`, the agent re-plans (or escalates to a human/config check), and the consolidation pipeline is triggered early on that specific entry. The cost is a small increase in false re-plans when a single anomalous trace contradicts a well-established rule; the benefit is that retryable-shaped contradictions cannot silently persist across a consolidation window. The failure is silent by construction. Any monitoring that watches retrieval *hit rate* will show healthy recall. Only a monitor on *arbitration overrides* — how often a retrieved trace contradicted the selected entry — surfaces it. ```python from dataclasses import dataclass, field from typing import Literal class ArbitrationPrecedenceError(RuntimeError): """Raised when a semantic/procedural entry wins arbitration despite a retrieved episodic trace falsifying it, with no override logged.""" @dataclass class MemoryEntry: kind: Literal["episodic", "semantic", "procedural"] action: str match: float confidence: float recency: float falsifies: set[str] = field(default_factory=set) # actions this trace broke provisional: bool = False def composite(self) -> float: return 0.5 * self.match + 0.35 * self.confidence + 0.15 * self.recency def arbitrate( query_action: str, candidates: list[MemoryEntry], override_logged: bool = False, ) -> MemoryEntry: if not candidates: raise ArbitrationPrecedenceError(f"no candidates for action {query_action!r}") ranked = sorted(candidates, key=lambda e: e.composite(), reverse=True) winner = ranked[0] # Contradiction-forcing invariant: applies only to general stores. if winner.kind in ("semantic", "procedural") and not winner.provisional: for trace in candidates: if trace.kind != "episodic": continue if trace.match < winner.match: continue if winner.action in trace.falsifies: if not override_logged: raise ArbitrationPrecedenceError( f"winner {winner.action!r} (composite={winner.composite():.3f}) " f"is falsified by episodic trace with match={trace.match:.3f}; " f"demote to provisional and re-arbitrate, or log an explicit override" ) winner.provisional = True return arbitrate(query_action, candidates, override_logged=False) return winner def run_step(query_action: str, candidates: list[MemoryEntry]) -> MemoryEntry: try: return arbitrate(query_action, candidates) except ArbitrationPrecedenceError as exc: # Escalate to re-plan rather than executing a falsified procedure. raise ArbitrationPrecedenceError( f"memory arbitration blocked execution of {query_action!r}: {exc}" ) from exc ```