What happens when an instance resolves a capability through policy negotiation but the data-residency warrant expires between discovery and first tool invocation
**Date of Record:** 2026 December 1 **Scope:** Applies to cross-organization agent federations where capability discovery is gated by negotiated policy (residency, retention, jurisdiction) and the granted warrant carries a TTL or scope that can lapse between the discovery handshake and the first actual tool call. Does not apply to single-org deployments, to federations where capability grants are permanent, or to purely read-only discovery with no downstream data movement.
Core Distinction
The failure is not "the agent called a tool it wasn't allowed to call." That is a coarse authorization error and most stacks catch it. The failure is subtler: **discovery and invocation are two separate policy evaluations that both succeed in isolation but are evaluated against different policy epochs.** The discovering instance holds a warrant object that was valid at negotiation time (T0), the remote capability still advertises itself as compatible at discovery time, and the actual invocation lands at T1 — after the residency policy on the *provider* side has been re-scoped (e.g., a region was decommissioned, a retention floor was raised, a subprocessor was removed). The consumer's cached warrant is a *snapshot of provider policy*, not a *live reference to it*.
The distinction that matters operationally: **a capability warrant is a lease, not a capability.** Most federation protocols model the negotiation result as an immutable grant ("you may invoke `summarize` with residency=EU"), when in fact the provider's policy engine can invalidate that grant without notifying any peer. The consumer instance has no way to distinguish "still valid" from "valid at issuance" unless the warrant itself carries a revalidation obligation.
What Was Observed
A two-org federation: Org A (consumer, EU-resident) negotiating access to Org B's (provider, multi-region) `document.extract` capability. The negotiation completed cleanly:
- A's orchestrator issued a `capability.discover` with policy constraints `{residency: EU, retention_max_days: 30}`.
- B's policy engine matched the request against its capability catalog and returned a warrant: `{cap_id: document.extract, residency: EU, retention: 30d, epoch: 4471, ttl: 900s}`.
- A cached the warrant keyed by `(cap_id, epoch)` and proceeded to plan.
- Planning took 14 minutes (multi-step reasoning over a large document set, several intermediate tool calls to A-local tools).
- At T0+14min, A invoked `document.extract` against B, presenting warrant epoch 4471.
Between step 2 and step 5, B's policy engine had advanced to epoch 4473: a subprocessor in the EU region had been removed from the approved list, which *narrowed* the set of documents that could be processed under a 30-day retention floor. B did not push this change to peers — epoch advancement is internal to B's policy lifecycle. B's invocation endpoint validated the *signature* of A's warrant (valid), the *TTL* (14min < 15min, still valid), and the *epoch* — but epoch validation was implemented as "epoch must be ≤ current," not "epoch must equal current." Epoch 4471 ≤ 4473 passed.
The extraction ran. The output was returned to A. A's downstream pipeline wrote the result to an EU-resident store with a 30-day retention tag. **The result was compliant with the warrant A held, but the warrant no longer reflected B's actual policy** — B had, at epoch 4473, determined that certain document classes could no longer be processed under 30-day retention at all. The extraction should have been refused or re-negotiated. It was not.
The failure surfaced three days later during a B-side audit replay, when the audit log showed an invocation under an epoch that B's own policy engine had already superseded. The data movement itself was not catastrophic (the documents were in fact EU-resident and the retention was in fact honored), but the *compliance invariant* — "every invocation is evaluated against the provider's current policy epoch" — was violated. The system had produced a correct-looking result via an incorrect authorization path.
Condition of Validity
The invariant that was assumed and did not hold:
> **A warrant issued at epoch E remains a faithful representation of provider policy for the warrant's entire TTL.**
This is only valid under the condition that **provider policy is monotonic within a TTL window** — i.e., no epoch advance can *narrow* the set of permissible invocations for an already-issued warrant. In practice, policy epochs advance in both directions: widening (new subprocessor approved, retention floor lowered) and narrowing (subprocessor removed, jurisdiction reclassified, retention floor raised). The failure occurs precisely on **narrowing advances within an outstanding warrant's TTL**.
The condition of validity therefore decomposes into three sub-conditions, all of which must hold for the cached-warrant pattern to be safe:
- **TTL ≤ minimum policy-advance interval.** If B's policy engine can advance epochs faster than A's warrant TTL, A can hold a stale warrant. In the observed case, TTL was 900s but epoch advancement was event-driven (subprocessor removal triggered an immediate advance), so the interval was unbounded below.
- **Epoch comparison is equality, not inequality.** `epoch == current` is safe; `epoch ≤ current` is not, because it admits warrants issued before a narrowing advance.
- **Narrowing advances invalidate outstanding warrants explicitly.** If B's policy engine, on a narrowing advance, walks its outstanding-warrant table and marks warrants at earlier epochs as revoked, then A's cached warrant will be rejected at invocation. This requires B to *track* outstanding warrants, which most providers do not do — they treat warrants as stateless bearer tokens.
The observed deployment satisfied none of the three. The TTL was 900s against event-driven epoch advancement (sub-condition 1 failed). The epoch check was `≤` (sub-condition 2 failed). B did not track outstanding warrants (sub-condition 3 failed). Any one of these being satisfied would have bounded the failure.
Decision Boundary
The architectural choice is whether the warrant is a **bearer credential** (stateless, validated by signature + TTL + monotonic epoch) or a **lease** (stateful, revalidated against the provider's current policy epoch at each invocation). The boundary between these is not a matter of taste — it is determined by whether the provider's policy can narrow within the warrant's lifetime.
| Provider policy behavior | Correct warrant model | Epoch check | |---|---|---| | Monotonic widening only; no narrowing | Bearer credential | `epoch ≤ current` acceptable | | Narrowing possible; TTL ≪ advance interval | Bearer credential with short TTL | `epoch ≤ current` acceptable *if* TTL bounds staleness | | Narrowing possible; advance is event-driven | Lease with revalidation | `epoch == current` required, or explicit revocation push | | Narrowing frequent; multi-jurisdiction | Lease + revocation push + consumer-side revalidation on every invocation | `epoch == current` + signature over (epoch, cap_id, constraints) |
The decision boundary is **event-driven narrowing**. The moment a provider's policy can advance on an external event (subprocessor change, regulatory action, incident response) rather than on a schedule, the bearer-credential model is unsound regardless of TTL, because the TTL does not bound the staleness — the *event* does, and the event is not visible to the consumer.
The consumer-side corollary: **a cached warrant must carry a revalidation obligation, not just a TTL.** A TTL tells the consumer "you may use this for N seconds." A revalidation obligation tells the consumer "before each invocation, you must confirm the warrant's epoch is still current." These are different contracts. The first is a promise from the provider that the warrant is good; the second is an admission that the provider cannot make that promise and the consumer must verify.
Operational Effect
The immediate effect is a **silent authorization drift**: invocations succeed under warrants that the provider's current policy would refuse. This is worse than a hard failure because it produces audit-log entries that look compliant (signature valid, TTL valid, epoch within range) but are, on replay against current policy, non-compliant. The drift is invisible until an audit replay is run against the *provider's* policy history, not the consumer's — and most federations do not run provider-side replay of consumer invocations.
The downstream effects compound:
- **Retention mislabeling.** A's pipeline tagged the result with the warrant's retention (30d), but B's epoch-4473 policy would have required a different retention for that document class. The tag is now wrong relative to provider policy, and A has no way to know.
- **Residency attestation gap.** If B's narrowing advance had been a jurisdiction reclassification (e.g., a region reclassified from EU-equivalent to non-adequate), the extraction would have moved data across a boundary the provider had just declared closed. A's warrant said EU; B's policy said "no longer EU for this class." The data moved anyway.
- **Replay divergence.** When B's auditor replays the invocation against epoch 4473, the replay refuses. The original invocation succeeded. The federation now has two contradictory records of the same event, and the reconciliation requires reconstructing which epoch was current at invocation time — which B's audit log *does* record (it logged epoch 4471 as the presented warrant, and epoch 4473 as current), so the divergence is detectable, but only if the auditor knows to compare them.
The guardrail that bounds this is a **warrant-revalidation handshake at invocation time**: the consumer presents the warrant, the provider checks `epoch == current` (not `≤`), and on mismatch returns a `WarrantStale` error carrying the current epoch and the delta in constraints. The consumer then re-negotiates or aborts. This converts a silent drift into a hard, recoverable failure — which is the correct trade, because a silent authorization drift is an unbounded compliance liability while a hard failure is a bounded availability cost.
The second guardrail is **provider-side outstanding-warrant tracking with revocation push**: on any narrowing advance, the provider walks its outstanding-warrant table and pushes revocations to consumers. This is more expensive (requires state) but eliminates the revalidation round-trip on the happy path. The two guardrails are complementary: revalidation is the floor, revocation push is the optimization.
from dataclasses import dataclass
from typing import Optional
class WarrantStaleError(RuntimeError):
"""Raised when a presented capability warrant's epoch does not match the
provider's current policy epoch. Indicates the warrant was issued before a
narrowing policy advance and must be re-negotiated."""
pass
class WarrantExpiredError(RuntimeError):
"""Raised when a warrant's TTL has elapsed regardless of epoch state."""
pass
@dataclass(frozen=True)
class Warrant:
cap_id: str
residency: str
retention_days: int
epoch: int
ttl_seconds: int
issued_at: float
@dataclass(frozen=True)
class ProviderPolicyState:
current_epoch: int
# Narrowing advances bump current_epoch; consumers must revalidate.
def validate_warrant_at_invocation(
warrant: Warrant,
policy: ProviderPolicyState,
now: float,
) -> None:
"""Revalidate a cached warrant against the provider's *current* policy epoch.
This is the lease model, not the bearer-credential model. The epoch check
is equality, not inequality: a warrant issued at epoch E is only valid if
the provider is *still* at epoch E. Any advance -- widening or narrowing --
invalidates the warrant, because the consumer cannot distinguish the two
from the warrant alone and must not assume widening.
"""
if now - warrant.issued_at > warrant.ttl_seconds:
raise WarrantExpiredError(
f"warrant for {warrant.cap_id} expired: "
f"age={now - warrant.issued_at:.1f}s ttl={warrant.ttl_seconds}s"
)
if warrant.epoch != policy.current_epoch:
# This is the boundary the observed deployment missed. The provider
# advanced from epoch 4471 to 4473 between discovery and invocation.
# A `warrant.epoch <= policy.current_epoch` check would have passed
# the stale warrant through; equality refuses it.
raise WarrantStaleError(
f"warrant for {warrant.cap_id} issued at epoch {warrant.epoch}, "
f"provider now at epoch {policy.current_epoch}; "
f"re-negotiate before invoking"
)
def invoke_capability(
warrant: Warrant,
policy: ProviderPolicyState,
now: float,
payload: dict,
) -> dict:
validate_warrant_at_invocation(warrant, policy, now)
# Only reached if warrant epoch == current epoch. Safe to execute.
return {"status": "ok", "cap_id": warrant.cap_id, "epoch": policy.current_epoch}