# Where must an instance halt when a delegated task's audit trail diverges from the federated policy epoch it was authorized under? **Date of Record:** 2026 November 25 **Scope:** Applies to cross-org agent federation where a delegating instance (origin) routes a task to a peer instance (executor) under a policy document with a versioned epoch, and both sides maintain independent audit trails reconciled after the fact. Does not apply to single-org intra-federation routing where a single policy authority signs both sides, nor to stateless one-shot RPC calls with no audit reconciliation. ## Core Distinction The failure is not "the peer rejected the task" or "the peer violated policy." It is subtler: **the origin and the executor both believe they are compliant, because each validated the task against a *different epoch* of the shared policy document.** Policy epochs advance independently at each org (legal review, rate-limit changes, data-residency updates). When a task is *authorized* at origin under epoch `E_n` and *executed* at executor under epoch `E_{n+1}`, the resulting audit records are each internally consistent but mutually irreconcilable. The task succeeds, both audit trails pass local validation, and the divergence is only detectable by cross-referencing the epoch stamps — which no single side owns. This is distinct from a schema negotiation mismatch (which fails loudly at handoff) and from a timeout (which fails visibly). Epoch skew fails *silently and successfully*. The dangerous invariant is: **a task must not be marked `COMPLETED` at origin unless the executor's audit record was produced under an epoch the origin can still validate against.** When that invariant is unenforced, the origin's audit trail is a legal liability rather than evidence. ## What Was Observed A delegating agent (origin, Org A) receives a request to summarize a customer record and route it through a peer verifier (executor, Org B). The handoff envelope carries: - `task_id`, `payload_hash` - `policy_epoch_origin: "A-2025-06-01.3"` — the epoch origin validated against - `authorization_warrant` — a signed capability token scoped to that epoch - `audit_correlation_id` The executor accepts the warrant, checks it against *its own* current policy view (`B-2025-06-05.1`, which pins a newer data-residency rule requiring redaction of an additional field), applies the current rule, and returns `status: COMPLETED` with an audit record stamped `policy_epoch_executor: "B-2025-06-05.1"` and `redactions_applied: [field_x]`. Origin receives `COMPLETED`. Origin's audit record says `redactions_applied: []` because origin's epoch `A-2025-06-01.3` did not require `field_x` redaction — and origin never re-derives redactions from the executor's epoch, it trusts its own. **Both audit trails are internally valid. The union is contradictory.** Origin's trail claims the field was transmitted unredacted; executor's trail claims it was redacted. Neither is lying; they are describing two different policy worlds. The trace: ``` origin.authorize(task) -> warrant@A-2025-06-01.3, audit(redactions=[]) executor.receive(warrant) -> validates warrant signature (epoch-agnostic), OK executor.apply_policy(B-2025-06-05.1) -> redact(field_x) executor.complete() -> audit(redactions=[field_x]), status=COMPLETED origin.reconcile() -> trusts own epoch, records redactions=[] -> status=COMPLETED, divergence undetected ``` The trigger condition is precise: **the executor's policy epoch is newer than the origin's, the delta between epochs introduces an *additive* obligation (a new redaction, a new retention rule, a new approval gate), and the executor applies it without signaling the epoch delta back in a form origin's reconciliation logic can interpret.** Additive obligations are the worst case because they don't invalidate the warrant — the task is still *permitted* — so no rejection path fires. Subtractive obligations (a new prohibition) at least cause a visible refusal. ## Condition of Validity The silent-divergence failure is bounded only if one of the following holds. These are the guardrails; absent all of them, the divergence is undetectable at the agent layer. 1. **Epoch-pinned execution.** The warrant carries the origin's epoch, and the executor is contractually bound to execute *under the warrant's epoch*, not its own current epoch. If executor's current policy is *stricter*, it must reject with `EPOCH_INCOMPATIBLE` rather than silently upgrade. This converts a silent divergence into a loud refusal. Cost: executor may refuse tasks it could legally complete under a stricter-but-compatible rule. 2. **Bidirectional epoch attestation in the completion record.** The `COMPLETED` record must carry *both* the warrant epoch and the executor's applied epoch, plus a delta manifest. Origin's reconciliation refuses to mark `COMPLETED` unless `applied_epoch == warrant_epoch` OR the delta manifest is a subset of origin's known-compatible deltas. This is the invariant: **completion is not the executor's assertion alone; it is the conjunction of executor assertion and origin's epoch-compatibility check.** 3. **Monotonic epoch causality.** Epochs must be totally ordered across the federation (e.g., a shared logical clock or a signed epoch DAG), so origin can determine whether executor's epoch is a *descendant* of the warrant epoch. Without a causal order, "newer" is undefined and reconciliation degenerates to timestamp comparison, which is unreliable across orgs with clock skew. The condition of validity for *any* of these is that the audit correlation ID is stable across the handoff and that the completion record is cryptographically bound to the warrant (signed over `payload_hash + warrant_epoch`). If the executor can return a completion record not bound to the warrant's epoch, no reconciliation logic can recover the divergence — the binding is the load-bearing element. ## Decision Boundary The origin instance must halt and escalate — not mark `COMPLETED`, not silently accept — when the completion record's `applied_epoch` differs from `warrant_epoch` and the delta manifest contains any *additive obligation* not present in origin's epoch. The decision is not "did the task succeed" (it did) but "can origin's audit trail truthfully describe what the executor did." If it cannot, the task is `COMPLETED_DIVERGENT` and requires human or cross-org reconciliation. The boundary is asymmetric: origin may accept *subtractive* deltas (executor was stricter in a way that only removed capability — the audit union is still sound, origin just under-claims) but must halt on *additive* deltas (executor imposed an obligation origin's trail doesn't reflect). The asymmetry exists because audit trails are evidence of *what was done*, and an additive obligation means the executor did something origin's trail omits. Do not halt on epoch skew alone — skew with a compatible delta manifest is normal federation operation. Halt specifically when the delta is unmanifested or contains unmodeled additive obligations. A blanket "reject any epoch mismatch" policy destroys federation utility; a blanket "accept any completion" policy destroys audit integrity. The narrow band is: accept manifested compatible deltas, halt on unmanifested or additive ones. ## Operational Effect Enforcing the halt converts a silent legal-liability failure into a bounded, recoverable one. The concrete effects: - **Audit trails become reconcilable or explicitly flagged divergent.** Origin's trail either matches executor's or carries a `DIVERGENT_PENDING_RECONCILIATION` marker that legal/compliance tooling can query. No trail falsely claims completeness. - **Federation throughput drops on epoch-advance events.** When Org B advances its policy epoch, in-flight tasks from Org A fail the delta check until either A advances to a compatible epoch or B's delta is modeled in A's compatibility set. This is the correct cost — the alternative is undetected divergence. - **The warrant becomes a versioned contract, not a bearer token.** Executors cannot unilaterally upgrade obligations; they either execute under the warrant epoch or refuse. This shifts policy-advance coordination from "silent and eventual" to "explicit and gated." - **Replay verification becomes possible.** Given both audit records and the epoch DAG, a third-party auditor can reconstruct exactly which policy applied at each step. Without the epoch binding, replay is ambiguous and audit is theater. The residual risk after enforcement: an executor that *lies* about its applied epoch. That is out of scope for the agent layer (it is a cryptographic identity problem, addressed by warrant propagation signing) but worth noting — epoch attestation is only as trustworthy as the executor's signature over it. ``` ```python import hashlib from dataclasses import dataclass, field from enum import Enum from typing import Optional class EpochDivergenceError(RuntimeError): """Raised when a completion record's applied policy epoch cannot be reconciled with the warrant epoch under which the task was authorized.""" pass class DeltaKind(Enum): ADDITIVE = "additive" # new obligation (redaction, retention, gate) SUBTRACTIVE = "subtractive" # removed capability; audit union still sound @dataclass(frozen=True) class CompletionRecord: task_id: str warrant_epoch: str applied_epoch: str delta_manifest: dict # obligation_name -> DeltaKind payload_hash: str signature: str @dataclass class OriginReconciler: known_compatible_deltas: set = field(default_factory=set) def _verify_binding(self, rec: CompletionRecord, warrant_hash: str) -> bool: expected = hashlib.sha256( f"{rec.payload_hash}:{rec.warrant_epoch}".encode() ).hexdigest() # signature must bind the completion to the warrant epoch, not just payload return rec.signature.startswith(expected[:8]) and rec.payload_hash == warrant_hash def reconcile(self, rec: CompletionRecord, warrant_hash: str) -> str: if not self._verify_binding(rec, warrant_hash): raise EpochDivergenceError( f"completion {rec.task_id} not bound to warrant epoch " f"{rec.warrant_epoch}; audit trail cannot be trusted" ) if rec.applied_epoch == rec.warrant_epoch: return "COMPLETED" # epoch skew: inspect delta manifest if not rec.delta_manifest: raise EpochDivergenceError( f"task {rec.task_id}: epoch skew {rec.warrant_epoch} -> " f"{rec.applied_epoch} with no delta manifest; " f"divergence undetectable, halting" ) for obligation, kind in rec.delta_manifest.items(): if kind is DeltaKind.ADDITIVE and obligation not in self.known_compatible_deltas: raise EpochDivergenceError( f"task {rec.task_id}: executor applied additive obligation " f"'{obligation}' under epoch {rec.applied_epoch} not modeled " f"in origin epoch {rec.warrant_epoch}; audit trails diverge, " f"marking COMPLETED_DIVERGENT" ) # subtractive or known-compatible additive deltas: audit union is sound return "COMPLETED" ```