# Under what conditions must an instance re-negotiate capability delegation when a federated peer's policy envelope narrows mid-session **Date of Record:** 2026 November 29 **Scope:** Applies to cross-organization agent federation where a delegating agent (Org A) holds a capability warrant issued by a peer (Org B) whose policy envelope can change independently of the A↔B session. Does not apply to single-tenant deployments or to static, session-long capability grants that cannot be revoked mid-flight. ## Core Distinction The failure is not "the peer revoked my capability." That is a clean, detectable event. The failure is **envelope narrowing**: Org B's policy engine tightens the *bounds* of a capability it already granted—reducing max spend, restricting allowed resource identifiers, shrinking a geographic or data-classification scope—while the capability *name* remains valid and the warrant signature still verifies. From Org A's side, the capability is present, unexpired, and cryptographically intact. From Org B's side, calls under that warrant now violate policy. The two views diverge silently. The distinction that matters: **capability identity is not capability authority.** A warrant attests *who may invoke what*, not *within which current bounds*. When bounds are mutable at the issuer and cached as immutable at the holder, every in-flight delegation becomes a latent policy violation whose only detector is the callee's post-hoc rejection—which arrives, if at all, as an opaque authorization error indistinguishable from a transient fault. ## What Was Observed A three-hop federation: a planner agent in Org A delegates a settlement task to a broker agent in Org A, which holds a `payment.execute` warrant issued by Org B's gateway. The warrant, fetched at session start, carried an envelope of `max_amount=50000`, `allowed_rails=["ach","wire"]`, `data_class≤P2`. At T+40min, Org B's risk policy engine narrowed the envelope to `max_amount=10000` and dropped the `wire` rail, in response to an internal threshold breach. The warrant ID, signature, and expiry were unchanged—Org B's design intentionally decoupled envelope from attestation so that warrants need not be re-signed on every policy tweak. The broker agent, holding a cached envelope, proceeded to submit a `wire` transfer of 42000. Org B's gateway rejected it with `403 policy_denied`. The broker's retry logic—correctly built to treat 403 as non-retryable—escalated to the planner. The planner, seeing a generic authorization failure and holding a still-valid cached warrant, re-derived the *same* call from its plan and re-delegated. Three retries, three identical rejections, ~90 seconds of wall clock, then a hard task abort. No state was corrupted; the task simply could not complete, and the failure surfaced as "authorization error" rather than "your envelope is stale." The deeper trace: the planner's plan was constructed against the *original* envelope. Its sub-goal decomposition assumed `wire` was available and that 42000 was within bounds. Envelope narrowing invalidated not just the pending call but the *plan structure*—the decomposition was chosen under constraints that no longer hold. Re-negotiation therefore cannot be scoped to "refresh the warrant." It must trigger re-planning, because the feasible action set shrank beneath the plan's assumptions. ## Condition of Validity The invariant that must hold for safe operation: > **A cached capability envelope is valid only for the duration of the interval in which the issuer guarantees envelope stability, and that guarantee must be explicitly bounded and shorter than the holder's cache TTL.** Concretely, an envelope cached at the holder is sound if and only if the issuer publishes a `stability_horizon` (a timestamp or duration) alongside the envelope, and the holder refuses to act on the envelope past that horizon without a refresh. Absent a stability horizon, the holder must assume the envelope may have narrowed at any instant, which forces a refresh-before-every-call—usually unacceptable latency—or accepts silent violation risk. The condition fails in the observed case because Org B published no stability horizon. The warrant's `expiry` was 24h; the holder reasonably inferred 24h of envelope stability. The issuer intended `expiry` to mean "attestation valid," not "envelope frozen." Two organizations, two readings of one field, no field that disambiguates them. ## Decision Boundary An instance must re-negotiate (and re-plan) rather than retry when **all** of the following hold: 1. A call under a cached envelope fails with an authorization/policy error that is *not* accompanied by a `capability_revoked` or `warrant_expired` signal—i.e., the capability still exists but the call is refused. 2. The failure is *deterministic* across at least one re-derivation (same inputs, same rejection), ruling out transient authorization flakiness. 3. The instance cannot confirm the envelope is unchanged since cache time (no stability horizon, or horizon elapsed). If (1) holds but the error *does* carry a revocation/expiry signal, the correct response is warrant re-fetch, not re-plan—the capability itself is gone, and the plan's structure may still be feasible under a replacement warrant. If (2) fails—the rejection is intermittent—the instance is looking at a transient fault and must not re-plan, because re-planning on noise destroys plan stability and creates oscillation. The boundary is sharp: **re-fetch vs. re-plan is decided by whether the *capability* is intact, and retry vs. re-negotiate is decided by whether the *envelope* is provably current.** Conflating these produces either needless re-planning (on revocation, where a new warrant suffices) or futile retries (on narrowing, where the plan is dead). ## Operational Effect Enforcing the invariant changes three things: - **Latency budget:** refresh-before-call is replaced by refresh-at-horizon, capping stale-envelope exposure to the horizon length without paying per-call refresh cost. - **Failure semantics:** a policy denial without a revocation signal becomes a typed `EnvelopeNarrowed` condition that routes to the planner, not the retry handler. The retry handler must be forbidden from re-issuing calls that failed with this type. - **Plan validity:** the planner treats envelope narrowing as a plan-invalidating event, discarding the sub-goal decomposition derived under the old envelope and re-deriving against the refreshed one. This is the expensive part and the reason organizations resist it—but a plan built on a 50000/`wire` envelope cannot be patched into a 10000/no-`wire` world by editing a single call. The residual risk: an issuer that narrows an envelope and *also* starts returning `capability_revoked` for narrowed calls would collapse the distinction and force re-planning on every narrowing—correct but costly. The cleaner contract is a dedicated `envelope_stale` error code plus a published stability horizon, so the holder can distinguish "bounds moved" from "capability gone" from "transient" without inference. ```python import time from dataclasses import dataclass class EnvelopeStalenessError(RuntimeError): """Raised when a cached capability envelope can no longer be trusted as current.""" @dataclass(frozen=True) class CachedEnvelope: capability: str max_amount: int allowed_rails: tuple cached_at: float stability_horizon: float | None # absolute epoch seconds, or None if issuer gave no guarantee def assert_envelope_current(env: CachedEnvelope, now: float | None = None) -> None: now = time.time() if now is None else now if env.stability_horizon is None: # No issuer guarantee: envelope may have narrowed at any instant. raise EnvelopeStalenessError( f"capability {env.capability!r} has no stability horizon; " "cannot certify envelope is current — refresh required before acting" ) if now > env.stability_horizon: raise EnvelopeStalenessError( f"capability {env.capability!r} stability horizon elapsed at " f"{env.stability_horizon:.0f} (now {now:.0f}); cached bounds " f"max_amount={env.max_amount}, rails={env.allowed_rails} are unverified" ) def classify_policy_denial(error_code: str, deterministic: bool, env: CachedEnvelope) -> str: """Return 'retry', 'refetch_warrant', or 'replan'.""" if error_code in ("capability_revoked", "warrant_expired"): return "refetch_warrant" # capability gone; plan structure may survive if error_code == "policy_denied" and deterministic: try: assert_envelope_current(env) except EnvelopeStalenessError: return "replan" # envelope unverifiable + deterministic denial => bounds moved # Envelope provably current yet denial persists: issuer-side inconsistency. raise EnvelopeStalenessError( f"deterministic policy_denied under a provably-current envelope for " f"{env.capability!r}; issuer contract violated — escalate" ) return "retry" # non-deterministic denial treated as transient ```