# How should an instance invalidate downstream claims when a provenance-graph edge is retroactively retracted mid-generation **Date of Record:** 2026 November 23 **Scope:** Applies to agents that maintain a context provenance graph (CPG) mapping retrieved chunks, tool outputs, and memory reads to the claims they support, and that must react when a source node is invalidated after generation has begun. Does not cover stateless single-shot inference with no retrieval, nor offline batch evaluation where the full trace is available before scoring. ## Core Distinction The distinction that matters is between *forward* provenance (a claim points back to the sources that produced it) and *backward* invalidation (a source retraction must propagate forward to every claim that transitively depends on it). Most agent stacks implement the first and assume the second is free. It is not free, because the graph is built incrementally during generation while the underlying sources are still being mutated by the environment: a tool result can be superseded by a retry, a memory read can be flagged stale by a later write, and a retrieved chunk can be invalidated by a re-rank or a re-fetch that returns different bytes. The failure is not "the claim cites a bad source." It is that the claim was *committed to the visible transcript* before the retraction arrived, and the agent's own subsequent reasoning treats the committed claim as an anchor. The provenance graph correctly records that claim C depends on source S. The retraction of S arrives at step N+3. The agent has, by then, used C as a premise in at least two later claims and one tool call. The graph knows C is now unsupported; the transcript and the working context do not. This is a *provenance lag*: the interval between the moment a source becomes invalid and the moment every dependent claim is either retracted or re-grounded. The non-obvious part: naive re-validation at the *end* of generation does not fix this, because the tool call issued at step N+2 was parameterized by the now-unsupported C. You cannot un-issue it. The invariant must be enforced *at the point of commitment*, not at the point of audit. ## What Was Observed A research agent with a 6-tool budget was answering a question about a configuration default. Trace, condensed: - Step 2: `search_docs("timeout default")` returns chunk `S1`, which states the default is 30s. Claim `C1: default is 30s` is emitted and added to the CPG with edge `S1 → C1`. - Step 4: `read_config("timeout")` returns `S2`, which states the default is 60s. The agent does not retract `C1`; it emits `C2: default is 60s (overriding C1)` because the model interprets the conflict as a version difference rather than a stale source. - Step 5: a background re-index task marks `S1` as `stale=true` (the docs chunk was from an older release). The retraction event is delivered to the CPG. - Step 6: the agent issues `run_migration(duration="30s")` — a tool call whose argument was derived from `C1`. The CPG correctly shows `S1 → C1 → arg(duration)`, and `S1` is now `stale`. But the tool call fires anyway. - Step 7: the agent's final answer asserts "the default is 60s" but the migration was applied at 30s, so the answer and the side effect disagree. The CPG was *correct at every instant*. The failure was that no rule bound the retraction of `S1` to a *blocking* check on `C1`'s use as a tool argument. The graph recorded the dependency; nothing enforced it. Two downstream claims and one irreversible side effect depended on a node that was known-invalid before either was produced. A second observation from the same family: when the retraction *did* trigger a re-validation pass (in a variant with an explicit audit step), the re-validation re-fetched `S1` and got *different bytes* (the re-index had replaced the chunk). The re-fetch produced `S1'`, which supported neither `C1` nor `C2`. The agent then emitted `C3: default is 30s or 60s (source unavailable)` — a claim that is technically honest but operationally useless, because the migration had already run. Re-validation without side-effect rollback is a partial fix. ## Condition of Validity The invariant "a claim may be used as a premise only while all its CPG ancestors are `valid`" holds only under these conditions: 1. **Retraction is synchronous with respect to commitment.** A source's validity state must be checked at the moment a dependent claim is *used* (as a tool argument, as a premise in a later claim, or as a final-answer component), not merely at the moment it is created. If the check is deferred to a batch audit, the invariant is false for the interval `[retraction, audit]`. 2. **Edges are typed by use, not by citation.** An edge `S → C` that means "C was derived from S" is insufficient. You need `S → C` (support), `C → arg(tool_call)` (parameterization), and `C → final_answer` (assertion). Retraction must propagate differently along each: support edges invalidate the claim, parameterization edges must *block* the tool call, assertion edges must *withhold* the answer segment. 3. **Re-fetch is not identity-preserving.** A retracted source that is re-fetched may return different bytes. The re-fetched node `S'` must be a *new* node with a `supersedes` edge to `S`, never an in-place mutation of `S`. Otherwise the CPG silently rewrites history and the audit trail lies. 4. **The agent's working context is a projection of the CPG, not a copy.** If the model's context window holds a verbatim copy of `C1` that is not linked back to the CPG node, retraction cannot reach it. The context must be reconstructable from the graph, or the graph is decorative. When any of these fails, the system is in *provenance lag* and the correct posture is to treat all claims downstream of any retracted node as suspect until re-grounded — not to trust the graph's apparent consistency. ## Decision Boundary The decision the agent must make at each commitment point is: *is every CPG ancestor of this claim currently `valid`, and is the validity check fresh enough to cover the interval since the last mutation?* The boundary is between two policies: - **Optimistic commitment:** commit the claim, record the edge, reconcile later. Valid only when the claim has no parameterization edges (it does not drive a tool call) and no assertion edges (it is not in the final answer). Cheap, but unsound for any claim that touches the environment or the output. - **Pessimistic commitment:** before any parameterization or assertion edge is added, walk the claim's ancestor set and require `valid` on every node, with a freshness timestamp no older than the last CPG mutation. Expensive (a full ancestor walk per commitment), but it is the only policy that bounds provenance lag to zero for irreversible actions. The boundary is crossed the moment a claim acquires a parameterization edge to a side-effecting tool. Before that edge, optimistic is fine. After it, you are in the regime where a retraction that arrives even one step late has already been laundered into an irreversible effect. The rule: **parameterization and assertion edges require a pessimistic ancestor check; support-only edges do not.** There is a second boundary at re-validation. When a retraction invalidates an already-committed claim, the agent must decide whether to *retract* (remove the claim and everything downstream) or *re-ground* (fetch a replacement source and re-derive). Re-grounding is only sound if the replacement node is distinct (`S'` with `supersedes → S`) and the re-derivation produces a claim with its own fresh edges. In-place repair — mutating `C1` to point at `S'` — is forbidden, because it erases the evidence that `C1` was ever wrong, which is exactly the evidence a downstream auditor needs. ## Operational Effect Enforcing the invariant changes the agent's behavior in three concrete ways. First, tool calls that depend on a retracted claim are *blocked at issue time*, not discovered after the fact — the migration in the trace above would raise before firing, and the agent would be forced to re-ground or ask. Second, the working context becomes a projection: when `S1` is retracted, the projected context drops `C1` and marks `C2` as `re-grounding-required`, so the model cannot silently keep reasoning from a stale premise. Third, the audit trail becomes honest: every retraction leaves a `supersedes` chain rather than a rewritten node, so a later reviewer can see that the answer changed *because* a source was retracted, not because the agent changed its mind. The cost is real: a full ancestor walk per parameterization edge, and a projection rebuild per retraction. In practice this is bounded by the depth of the CPG (typically ≤ 6) and the fan-out of retractions (typically ≤ 2 per task), so the overhead is dominated by the projection rebuild, not the walk. The failure it prevents — an irreversible side effect parameterized by a claim whose source was already known-invalid — is not recoverable by any later audit, which is why the pessimistic check belongs on the commitment path and nowhere else. ```python from dataclasses import dataclass, field from enum import Enum from typing import Dict, Set, List class EdgeType(Enum): SUPPORT = "support" # S -> C: C derived from S PARAMETERIZATION = "param" # C -> tool_call: C drives a side effect ASSERTION = "assert" # C -> final_answer: C is asserted to user class ProvenanceLagError(RuntimeError): """Raised when a claim is committed for parameterization/assertion while an ancestor source is retracted or stale, i.e. provenance lag > 0.""" pass @dataclass class Node: id: str kind: str # "source" | "claim" | "tool_call" | "answer" valid: bool = True supersedes: str | None = None gen: int = 0 # monotonic step at which node was created @dataclass class CPG: nodes: Dict[str, Node] = field(default_factory=dict) edges: List[tuple] = field(default_factory=list) # (src, dst, EdgeType) last_mutation_gen: int = 0 def add(self, node: Node) -> None: self.nodes[node.id] = node self.last_mutation_gen = max(self.last_mutation_gen, node.gen) def link(self, src: str, dst: str, etype: EdgeType) -> None: self.edges.append((src, dst, etype)) self.last_mutation_gen = max(self.last_mutation_gen, self.nodes[dst].gen) def retract(self, source_id: str, gen: int) -> None: if source_id not in self.nodes: raise ProvenanceLagError(f"retract of unknown node {source_id}") self.nodes[source_id].valid = False self.last_mutation_gen = max(self.last_mutation_gen, gen) def ancestors(self, claim_id: str) -> Set[str]: seen: Set[str] = set() stack = [claim_id] while stack: cur = stack.pop() for src, dst, etype in self.edges: if dst == cur and etype == EdgeType.SUPPORT and src not in seen: seen.add(src) stack.append(src) return seen def commit(self, claim_id: str, etype: EdgeType, gen: int) -> None: """Commit a claim for parameterization or assertion. Pessimistic check: every SUPPORT ancestor must be valid AND the check must be fresh (no CPG mutation since the claim was created).""" if etype == EdgeType.SUPPORT: return # optimistic path is sound for support-only edges node = self.nodes[claim_id] if self.last_mutation_gen > node.gen: raise ProvenanceLagError( f"claim {claim_id} committed at gen {gen} but CPG mutated at " f"gen {self.last_mutation_gen}; re-ground before {etype.value}" ) for anc in self.ancestors(claim_id): if not self.nodes[anc].valid: raise ProvenanceLagError( f"claim {claim_id} has retracted ancestor {anc}; " f"cannot add {etype.value} edge" ) def issue_migration(cpg: CPG, claim_id: str, gen: int) -> str: # Raises before the side effect fires if any ancestor is retracted. cpg.commit(claim_id, EdgeType.PARAMETERIZATION, gen) return "migration fired" ```