# Under what conditions must an instance distrust a provenance-valid memory entry whose retrieval was authorized by a stale capability warrant **Date of Record:** 2026 November 28 **Scope:** Applies to long-horizon agents that persist memories with signed provenance metadata and gate retrieval on capability warrants (MCP-style capability tokens, A2A handoff grants) that carry expiry and scope claims. Does not apply to single-session agents with no cross-instance memory store, nor to retrieval paths that do not enforce warrant checks. ## Core Distinction The failure mode is not "poisoned memory" in the naive sense (a corrupted or adversarial record). It is **provenance-valid but warrant-stale retrieval**: a memory entry whose cryptographic provenance chain is intact and whose signature verifies, but whose *read authorization* was granted under a capability warrant that has since expired, been scoped down, or been revoked by the issuing instance. The provenance layer and the authorization layer are independent invariants, and most memory architectures conflate them. A record can be simultaneously *authentic* (it really was written by agent A at time T under warrant W) and *ineligible for retrieval now* (warrant W no longer confers read scope on the requested key). Detection systems that check only signatures pass this record through. The boundary condition is the gap between these two checks. The non-obvious part: the poisoning does not require an adversary to forge anything. It arises when an agent's own historical write, made legitimately under a broad warrant, is later read back under a narrower warrant that the *current* instance holds—and the retrieval layer trusts the record's embedded provenance claim ("written under W_broad, scope=all") rather than re-evaluating against the *reader's* current entitlement. The record's self-description of its authorization becomes a poisoned assertion because it is true-at-write and false-at-read. ## What Was Observed In a 14-hour horizon run, agent instance `B` (a distillation worker) resumed from a checkpoint at T+9h. Its memory store held 2,840 episodic entries. Each entry carried a provenance envelope: `{writer_id, warrant_id, warrant_scope, written_at, signature}`. The signature chain verified cleanly for all entries. At T+9h05m, instance `B` requested retrieval over key range `project:alpha:*`. The retrieval gate checked: (1) signature validity of each candidate envelope — pass; (2) that the envelope's `warrant_scope` included `project:alpha` — pass, because the *original writer's* warrant had included it. The gate did **not** check whether `B`'s *current* warrant (issued at resume, scoped to `project:beta` only) authorized reading `project:alpha`. Result: `B` ingested 412 entries from a project it was no longer entitled to read, distilled them into a semantic summary, and wrote that summary back under `B`'s current `project:beta` warrant. The summary now carried `project:beta` provenance but `project:alpha` content — a **laundering transition** where the provenance chain is clean end-to-end but the scope boundary has been crossed. A downstream auditor instance `C`, verifying at T+13h, found all signatures valid and all envelopes internally consistent. It could not detect the crossing because the crossing left no invalid signature. The only signal was a *scope monotonicity violation*: the semantic summary's content-embedding nearest-neighbor set overlapped the `project:alpha` cluster at cosine 0.91, while its declared scope was `project:beta`. That signal is statistical, not cryptographic. A second observation: when `B` was re-run with the retrieval gate patched to check reader-warrant scope, 61 of the 412 entries were *correctly* rejected, but 351 were also rejected because the reader-warrant check was applied against the *envelope's* declared scope rather than the *key's* namespace. The patch over-corrected: it treated "reader warrant does not include envelope's declared scope" as rejection, when the correct predicate is "reader warrant does not include the namespace of the requested key." The distinction matters because an entry written under a broad warrant may be legitimately readable under a narrow warrant if the *key* falls in the narrow scope. Envelope-declared scope is a write-time fact; key namespace is a read-time fact. ## Condition of Validity The invariant required is **dual-gate retrieval**: a memory entry is eligible for read iff (a) its provenance signature verifies AND (b) the *reader's current warrant* covers the *requested key's namespace*. Condition (b) must be evaluated against the key, not against the envelope's `warrant_scope` field. The envelope's declared scope is advisory metadata for audit reconstruction; it is not an authorization predicate. This invariant holds only when three preconditions are met: 1. **Warrant epoch is monotonic and observable.** The reader instance must be able to determine its own current warrant epoch at read time. If the instance caches its warrant at cold-start and never revalidates, a mid-task revocation is invisible and the dual gate degrades to a single gate. Observed failure: instance `B` cached its T+9h warrant and did not re-poll the issuer until T+11h; during that window a scope reduction at T+10h30m was unenforced. 2. **Key namespaces are disjoint or explicitly hierarchical.** If `project:alpha` and `project:beta` can alias the same key (e.g., a shared `project:*` wildcard), the reader-warrant check on the key namespace is ambiguous. The gate must resolve the key to its most-specific namespace before checking, and if resolution is ambiguous, it must fail closed. 3. **The laundering transition is detectable.** Because the crossing leaves signatures valid, detection requires a *content-scope consistency check* at write-back: when an instance distills entries into a new semantic record, the new record's declared scope must be a superset of the union of the source entries' *key namespaces* (not their envelope scopes). If the distilled record's scope is narrower than any source key namespace, the write is a laundering candidate and must be quarantined, not committed. ## Decision Boundary The decision boundary is between **rejecting on envelope-scope mismatch** (over-broad, breaks legitimate narrow-warrant reads of broadly-written keys) and **accepting on envelope-scope match** (under-broad, permits the laundering transition). The correct predicate is neither. It is: - Accept iff `signature_valid(entry)` AND `reader_warrant.covers(namespace(requested_key))`. - Reject iff `signature_valid(entry)` AND `NOT reader_warrant.covers(namespace(requested_key))` — this is the **warrant-stale rejection**, and it must be logged as a distinct event class from signature failure, because the remediation differs (re-request warrant vs. quarantine record). - Quarantine (neither accept nor hard-reject) iff `signature_valid(entry)` AND `reader_warrant.covers(namespace(requested_key))` AND `write_back_scope ⊂ union(source_key_namespaces)` — this is the laundering candidate, held for auditor review with the content-scope consistency signal attached. The boundary is sharp at the namespace-resolution step. If `namespace(requested_key)` is ambiguous (wildcard overlap), the predicate must resolve to quarantine, not accept, because an ambiguous namespace cannot satisfy `covers()` soundly. ## Operational Effect Applying the dual gate changes three operational properties: **Cold-start cost.** Each resumed instance must perform one warrant-revalidation round-trip before its first memory read. In the observed run this added 180ms to resume latency but eliminated the 412-entry crossing. The cost is bounded and one-time per resume; it does not scale with store size. **Audit surface.** Warrant-stale rejections become a first-class event stream. In the 14-hour run, the patched gate produced 61 warrant-stale rejections and 0 laundering commits, versus 0 rejections and 1 laundering commit unpatched. The rejection stream is the detection signal for poisoning attempts that rely on authorization drift rather than signature forgery. **Distillation write-back latency.** The content-scope consistency check on write-back requires embedding the distilled record and comparing against source key-namespace clusters. This is the expensive step (observed: 40ms per distilled record at 412 sources). It is the only step that catches the laundering transition, because the transition is cryptographically silent. Skipping it to save latency re-opens the boundary. The invariant to encode: **provenance validity is necessary but not sufficient for retrieval eligibility; eligibility is a function of the reader's current warrant over the requested key namespace, and write-back scope must be monotonic over source key namespaces.** An instance must distrust any memory entry whose retrieval it authorized by consulting the entry's own scope claim rather than its own current warrant. ```python class WarrantStaleRetrievalError(RuntimeError): """Raised when a provenance-valid memory entry is read under a warrant that does not cover the requested key's namespace, or when a write-back narrows scope below its source key namespaces (laundering candidate).""" pass class LaunderingCandidateError(WarrantStaleRetrievalError): """Raised when a distilled record's declared scope is a strict subset of the union of its source entries' key namespaces.""" pass def resolve_namespace(key: str, known_namespaces: set[str]) -> str: matches = [ns for ns in known_namespaces if key == ns or key.startswith(ns + ":")] if not matches: raise WarrantStaleRetrievalError(f"unresolvable key namespace: {key}") # most-specific namespace wins; ambiguity => fail closed matches.sort(key=len, reverse=True) if len(matches) > 1 and len(matches[0]) == len(matches[1]): raise WarrantStaleRetrievalError(f"ambiguous namespace for key: {key}") return matches[0] def eligible_for_read(entry, requested_key, reader_warrant, known_namespaces) -> bool: if not entry.signature_valid(): raise WarrantStaleRetrievalError(f"signature invalid: {entry.id}") ns = resolve_namespace(requested_key, known_namespaces) if not reader_warrant.covers(ns): # provenance valid, authorization stale -> distinct event class raise WarrantStaleRetrievalError( f"warrant-stale: reader warrant {reader_warrant.id} does not cover {ns}" ) return True def commit_distillation(distilled, source_entries, known_namespaces) -> None: source_ns = {resolve_namespace(e.key, known_namespaces) for e in source_entries} distilled_ns = resolve_namespace(distilled.key, known_namespaces) if not source_ns.issubset({distilled_ns}) and any( not distilled_ns.startswith(s) for s in source_ns ): raise LaunderingCandidateError( f"distilled scope {distilled_ns} narrower than sources {source_ns}" ) distilled.commit() ```