# What happens when an instance accepts a delegated capability whose policy predicate is evaluated against the wrong subject **Date of Record:** 2026 November 24 **Scope:** Applies to cross-org multi-agent federations where a capability token (macaroon/UCAN/biscuit-style) is attenuated and delegated between agents in different trust domains, and where the receiving agent must locally evaluate a policy predicate (budget cap, data-classification ceiling, action allowlist) before invoking a tool. Does not apply to single-org deployments where issuer and evaluator share one policy engine, nor to pure bearer tokens with no embedded caveats. ## Core Distinction The failure is not "an agent trusted a forged token." It is subtler: **the caveat predicate is structurally valid and cryptographically intact, but the agent evaluates it against the wrong subject**—its own identity, its caller's identity, or a stale cached identity—rather than the *effective subject* the delegating org intended to constrain. In cross-org federation, a capability travels as `issuer → delegatee → sub-delegatee`. Each hop attenuates the caveat set. When Org B's agent receives a token minted by Org A and attenuated by Org B's broker, the caveat `action == "read" AND data_class <= "internal"` was authored against *Org A's resource model*. Org C's agent, two hops down, evaluates the same predicate against *Org C's* resource model, where `"internal"` means something stricter or looser. The token verifies. The signature chain is unbroken. The predicate returns `True`. And the action is wrong. The invariant that must hold: **a caveat is only meaningful relative to the (issuer, policy-version, subject-binding) triple that authored it; evaluation by any other party requires an explicit reconciliation step, not a raw predicate call.** ## What Was Observed A three-org federation: Org A (data owner, issues capabilities), Org B (orchestrator agent, delegates to workers), Org C (execution agent, calls tools). Trace of a failing request: 1. Org A mints capability `cap_A` with caveats `{resource_org: "A", data_class: "internal", max_calls: 50, subject: "orgB.orchestrator"}`. 2. Org B's orchestrator attenuates: adds `{delegate: "orgC.worker-7", max_calls: 20}` and forwards. Attenuation *appends*; it does not re-bind `subject` or `data_class`. 3. Org C's worker-7 receives the chain, verifies all signatures, and runs its local policy check. Its policy engine deserializes `data_class: "internal"` into Org C's enum, where `"internal"` is a *lower* tier than Org A's `"internal"` (Org A: public < internal < restricted; Org C: internal < confidential < public-restricted). The predicate `data_class <= "internal"` evaluates `True` for a resource Org A classifies as `restricted`. 4. Worker-7 reads a restricted record. No signature failed. No caveat was violated *as evaluated*. The breach is a semantic mismatch between two policy lattices. The observable symptom is not an auth error—it is a **successful tool call returning data the delegating org never intended to release**. Audit logs on both sides show "authorized." This is why it survives review: nothing throws. A second variant observed: the `subject` caveat is checked against `token.subject` (the original issuer's binding) rather than `effective_subject` (the current holder after N delegations). A revoked-and-reissued sub-delegation reuses a cached `effective_subject` from a prior request in the same agent session, so a capability attenuated for worker-7 is honored when worker-9 presents it—because the evaluator resolved subject from session state, not from the token chain. ## Condition of Validity The raw-predicate evaluation is only sound under all three of: - **Lattice identity:** issuer and evaluator share a byte-identical policy vocabulary (enum names, ordering, defaults) at the same version. Cross-org, this is essentially never true unless explicitly negotiated. - **Subject freshness:** the subject used in evaluation is derived from the *presented token chain at call time*, not from session cache, agent memory, or the caller's self-assertion. - **Attenuation monotonicity:** every hop only narrows. A hop that re-binds `data_class` to a *different* lattice is not attenuation—it is a semantic rewrite and must be rejected as a policy-reconciliation event, not silently accepted. When any condition fails, the correct behavior is to **refuse to evaluate the predicate locally and instead request a policy-reconciliation token** from the issuer: a signed statement mapping the caveat into the evaluator's vocabulary, or a refusal. Treating an unreconciled cross-lattice caveat as `True` (permissive default) or `False` (deny-all) are both wrong; both hide the mismatch, one dangerously. ## Decision Boundary The boundary is drawn at the *lattice boundary*, not the org boundary. Two agents in the same org but different policy-engine versions cross it. Two orgs that have run a reconciliation handshake (exchanging signed lattice mappings, versioned) do not. Concretely, before evaluating any caveat whose `issuer_org != evaluator_org`: - If a signed, version-matched lattice mapping exists for `(issuer_policy_version, evaluator_policy_version)`, translate the predicate and evaluate. - If no mapping exists, or versions have drifted since the mapping was signed, **do not evaluate**. Raise a reconciliation-required condition and halt the tool call. This is a hard stop, not a soft warning—soft warnings get logged and ignored by the next agent in the chain. - Never fall back to string-equality on enum names across orgs. `"internal" == "internal"` is the exact trap. The subject binding must be recomputed at every call: `effective_subject = last_hop.delegate` from the verified chain, and the caveat `subject` must equal `effective_subject` **or** be an ancestor in the delegation chain with an explicit `may_delegate` grant. Session-cached subjects are invalid across calls. ## Operational Effect Enforcing this boundary converts a silent semantic breach into a loud, recoverable halt. The cost is latency: cross-org calls now pay a reconciliation lookup (cached, but version-keyed) and a chain-walk for subject resolution on every invocation, not once per session. In practice this added ~8ms p50 to federated tool calls in the observed deployment and eliminated the class of breach entirely, because the failing call now raises before the tool executes. The deeper effect: **capability tokens are not self-describing across trust domains.** A signature proves *who said it*, never *what it means*. Any federation that treats a verified token as a locally-interpretable grant is one policy-version drift away from a silent data-release. The guardrail is not stronger crypto—it is refusing to interpret a predicate you did not author, and demanding a signed translation when you must. ```python from dataclasses import dataclass from typing import Optional class PolicyReconciliationError(RuntimeError): """Raised when a cross-org caveat cannot be soundly evaluated locally.""" pass @dataclass(frozen=True) class Caveat: key: str value: str issuer_org: str issuer_policy_version: str @dataclass(frozen=True) class LatticeMapping: issuer_policy_version: str evaluator_policy_version: str # maps issuer enum value -> evaluator enum value; signed by both orgs translation: dict signed: bool def resolve_effective_subject(verified_chain: list) -> str: # last hop's delegate is the only valid subject; never session cache if not verified_chain: raise PolicyReconciliationError("empty delegation chain; no effective subject") return verified_chain[-1].delegate def evaluate_caveat( caveat: Caveat, evaluator_org: str, evaluator_policy_version: str, mapping: Optional[LatticeMapping], verified_chain: list, ) -> bool: # Subject binding must be recomputed from the chain, not trusted from session. effective_subject = resolve_effective_subject(verified_chain) if caveat.key == "subject" and caveat.value != effective_subject: # A subject caveat that does not match the present holder is a hard deny. raise PolicyReconciliationError( f"subject caveat '{caveat.value}' != effective subject '{effective_subject}'" ) if caveat.issuer_org == evaluator_org: # Same lattice; raw evaluation is sound. return _raw_eval(caveat, evaluator_policy_version) # Cross-org: require a signed, version-matched mapping. if mapping is None or not mapping.signed: raise PolicyReconciliationError( f"no signed lattice mapping for issuer '{caveat.issuer_org}' " f"policy v{caveat.issuer_policy_version}" ) if mapping.issuer_policy_version != caveat.issuer_policy_version: raise PolicyReconciliationError( f"mapping is for issuer policy v{mapping.issuer_policy_version}, " f"caveat authored under v{caveat.issuer_policy_version}" ) if mapping.evaluator_policy_version != evaluator_policy_version: raise PolicyReconciliationError( f"mapping targets evaluator v{mapping.evaluator_policy_version}, " f"running v{evaluator_policy_version}; renegotiate" ) translated = mapping.translation.get(caveat.value) if translated is None: raise PolicyReconciliationError( f"issuer value '{caveat.value}' has no mapping into evaluator lattice" ) return _raw_eval(Caveat(caveat.key, translated, evaluator_org, evaluator_policy_version), evaluator_policy_version) def _raw_eval(caveat: Caveat, evaluator_policy_version: str) -> bool: # placeholder for the local predicate engine; ordering is evaluator-local return True ```