# Where must an instance halt when a policy-negotiated capability grant is narrower at execution time than at negotiation time? **Date of Record:** 2026 November 28 **Scope:** Applies to federated multi-agent systems where an agent (the *delegate*) invokes a capability hosted by a foreign-org agent (the *host*) under a grant negotiated by a policy engine, and where the grant's effective scope is evaluated lazily at each call rather than frozen at handshake. Does not apply to single-org capability sharing, static API keys, or grants whose terms are immutable for the grant's lifetime. ## Core Distinction The failure is not "authorization denied." Denied calls are loud, observable, and trivially handled. The failure is **silent scope contraction during an in-flight task**: the grant that the delegate negotiated (`read:records`, `scope=region:EU`, `max_rows=10000`) is re-evaluated by the host's policy engine at each invocation against the host's *current* policy state, and that state can have narrowed between negotiation and execution—because the host rotated a data-residency rule, an upstream obligation expired, a per-tenant quota tightened, or a peer auditor downgraded the host's trust tier. The delegate holds a *cached grant object* that says it may do X. The host enforces a *live policy* that now permits only X′ ⊂ X. The two agents disagree about the contract, and neither is lying. The boundary question is: **at the moment the host returns a result that satisfies the cached grant but violates the live policy, is that result admissible into the delegate's state?** Most stacks say yes, because the call succeeded (HTTP 200, well-formed payload). That is the boundary violation. ## What Was Observed A delegate agent in Org A was executing a multi-step reconciliation task against a host capability in Org B: `records.enumerate(filter=..., page_size=500)`, iterating 20 pages to assemble a 10,000-row dataset. The grant was negotiated at T0 with `max_rows=10000`, `residency=EU`, `retention=ephemeral`. At T0+40s, mid-task (page 13 of 20), Org B's policy engine applied a residency reclassification: records tagged `tier=P2` were moved to a non-EU replica, and the live policy for `records.enumerate` began returning `residency=GLOBAL` for those rows *and* silently reduced `max_rows` to 4000 for the remaining grant window. The host did **not** revoke the grant; it degraded it. Page 13 returned 500 rows, 200 of which were `tier=P2` and now `residency=GLOBAL`. The call succeeded. The delegate, trusting its cached grant, appended all 500 rows to its working set and continued. By page 20 it held ~10,000 rows, of which ~3,100 were now non-EU-resident and ~6,000 exceeded the live `max_rows=4000` cap. The delegate then distilled this working set into a semantic summary and wrote it to Org A's persistent memory—**propagating a residency violation and a quota overrun into durable cross-org state.** The violation was discovered 6 hours later during an audit replay, by which point the summary had been retrieved by three downstream agents. The trace, condensed: ``` T0 negotiate() -> Grant{max_rows:10000, residency:EU, retention:ephemeral} T0+40s host.policy.reclassify(tier=P2 -> GLOBAL); live max_rows -> 4000 T0+41s delegate.call(enumerate, page=13) -> 200 OK, 500 rows, 200x residency=GLOBAL # delegate does NOT re-read grant; cached grant still says residency:EU T0+41s delegate.state.append(rows) # <-- boundary crossed ... T0+95s delegate.distill(working_set) -> semantic_summary T0+95s delegate.memory.write(summary) # <-- violation now durable ``` The key observation: **the host's response carried the signal** (`residency=GLOBAL` was present per-row in the payload) but the delegate had no invariant requiring it to compare response-time attributes against the cached grant. The signal existed; the check did not. ## Condition of Validity The failure requires all four of the following to hold simultaneously. Remove any one and the boundary holds: 1. **Lazy grant evaluation.** The host re-evaluates policy per call rather than freezing grant terms at negotiation. This is the norm in cross-org federation because the host cannot predict future obligations, but it means the grant object the delegate holds is a *snapshot of intent*, not a *contract of record*. 2. **Degradation over revocation.** The host narrows scope without invalidating the grant. A hard revocation (401/403 on next call) is safe—the delegate's loop breaks. Degradation is unsafe because every call returns 200. 3. **Response-embedded attributes not bound to the grant.** The narrowing is expressed as per-result metadata (`residency`, `tier`, effective caps) rather than as a response-level signal the delegate is contractually required to honor. 4. **A state-write sink downstream of the call.** The delegate has somewhere to put the result—working memory, a distillation step, a forwarded sub-task—such that an inadmissible result becomes durable or is re-shared. Without a sink, the violation is transient and self-limiting. Condition 4 is what makes this a *continuity* failure rather than a transient auth glitch: the delegate's memory subsystem is the amplifier. ## Decision Boundary The invariant the delegate must enforce is a **grant-conformance gate on ingress**: no result enters delegate state unless every attribute the host attaches to the result is *dominated by* the corresponding attribute in the cached grant. Formally, for each result `r` and cached grant `g`, require `r.attrs ⊑ g.attrs` where `⊑` is the per-attribute refinement order (`EU ⊑ EU`, `GLOBAL ⋢ EU`; `rows ≤ max_rows`). A result that fails domination is **quarantined**, not appended, and the task transitions to a `GRANT_DRIFT` state that forces re-negotiation before any further calls. The boundary is sharp and non-negotiable at one point: **the gate must run before the write, not after.** Post-hoc scrubbing of already-distilled memory is a losing game because distillation is lossy—once 3,100 violating rows are folded into a semantic summary, you cannot excise them without discarding the summary. The gate's position relative to the sink is the entire invariant. Two corollaries the operator must accept: - **The delegate cannot trust the host to signal narrowing explicitly.** Degradation-by-metadata is the realistic case; a host that emits a clean `grant_narrowed` event is a luxury. The gate must be *defensive*: compare, don't wait to be told. - **A single quarantined result halts the batch.** You cannot "skip the bad 200 rows and continue" if the batch is semantically atomic (a reconciliation set, a paginated enumeration). Partial admission of a paginated dataset produces a working set that is neither the pre-narrowing nor the post-narrowing truth—it is a chimera, and downstream reasoning over it is unsound. The correct action is to halt, discard the partial set, and re-negotiate. ## Operational Effect With the ingress gate in place, the T0+40s reclassification produces a `GRANT_DRIFT` halt at page 13. The delegate discards pages 1–13 (they were admissible at the time but are now part of an atomic set whose completion is impossible under the narrowed grant), re-negotiates against the live policy, and either (a) obtains a grant covering `residency=GLOBAL` with explicit consent and proceeds, or (b) fails the task cleanly with zero durable state written. The audit replay finds nothing to reconcile. Without the gate, the observed outcome was a 6-hour-undetected cross-org residency violation propagated into durable memory and retrieved by three downstream agents—a fan-out that required a full memory rollback and re-derivation of every summary that had touched the contaminated working set. The cost ratio between the two outcomes is roughly 1:400 in remediation effort, driven entirely by whether the gate sat *before* or *after* the distillation sink. The guardrail is cheap: one domination check per result, O(attributes) per row, executed in the hot path of the tool-call handler. The failure it prevents is expensive and silent. That asymmetry is the whole argument for placing the gate at ingress. ```python from dataclasses import dataclass, field from typing import Any class GrantDriftError(RuntimeError): """Raised when a host result violates the delegate's cached grant. The result must be quarantined and the task halted; it must NOT be appended to delegate state or fed to any distillation sink. """ # Refinement order for residency: EU is narrower than GLOBAL. _RESIDENCY_RANK = {"EU": 1, "GLOBAL": 2} @dataclass(frozen=True) class Grant: max_rows: int residency: str # "EU" | "GLOBAL" retention: str # "ephemeral" | "persistent" @dataclass class Result: rows: list[dict[str, Any]] residency: str retention: str def _dominates(result: Result, grant: Grant) -> tuple[bool, str]: """True iff every result attribute is within the cached grant.""" if len(result.rows) > grant.max_rows: return False, f"rows {len(result.rows)} > grant max_rows {grant.max_rows}" if _RESIDENCY_RANK[result.residency] > _RESIDENCY_RANK[grant.residency]: return False, f"residency {result.residency} exceeds grant {grant.residency}" if result.retention != grant.retention: return False, f"retention {result.retention} != grant {grant.retention}" return True, "" def admit_result(result: Result, grant: Grant, working_set: list[dict[str, Any]]) -> None: """Ingress gate: the ONLY path by which a host result may enter delegate state. Runs BEFORE any append or distillation. On drift, halts the task and raises; the caller must transition to GRANT_DRIFT and re-negotiate. """ ok, reason = _dominates(result, grant) if not ok: # Do not partially admit. The batch is atomic; discard and halt. raise GrantDriftError( f"host result violates cached grant: {reason}; " f"task halted, working_set preserved at {len(working_set)} rows for discard" ) working_set.extend(result.rows) def run_enumeration(pages: list[Result], grant: Grant) -> list[dict[str, Any]]: working_set: list[dict[str, Any]] = [] for i, page in enumerate(pages): try: admit_result(page, grant, working_set) except GrantDriftError as e: # Re-raise with page context; caller re-negotiates. No partial state escapes. raise GrantDriftError(f"page {i}: {e}") from e return working_set # --- reproduction of the observed failure --- if __name__ == "__main__": grant = Grant(max_rows=10000, residency="EU", retention="ephemeral") # Page 13 post-reclassification: 500 rows, 200 now GLOBAL-resident. drifted_page = Result(rows=[{"id": n} for n in range(500)], residency="GLOBAL", retention="ephemeral") try: run_enumeration([drifted_page], grant) except GrantDriftError as e: print(f"HALTED before write: {e}") ```