# Where must an instance bound credential-chain depth before bilateral policy negotiation can terminate in cross-org agent federation **Date of Record:** 2026 November 26 **Scope:** Applies to federated agent systems where an instance presents a verifiable credential (VC) chain to a peer org's policy engine and negotiates a bilateral capability warrant before executing a delegated task. Does not apply to single-org deployments, static API-key trust, or cases where trust is bootstrapped by a pre-shared root of trust with no negotiation step. ## Core Distinction The failure is not "invalid credential" or "policy mismatch." It is **non-termination of bilateral policy negotiation caused by unbounded credential-chain depth combined with reciprocal policy deferral**. Two agents, each holding a VC chain whose length is a function of the other's policy requirements, will each re-derive the other's acceptable credential depth from the peer's stated policy, append a delegation link, and re-present — a mutual recursion that converges only when a hard depth bound is imposed by one side unilaterally. The distinction that matters: a *rejected* credential is a clean terminal state (fail closed, return error). A *negotiation that never terminates* is a liveness failure — the agent burns token budget and wall-clock time in a loop that looks like progress (each round yields a "more compliant" credential) but has no fixed point. Verifiers that only check credential *validity* per round never observe the divergence, because every individual round is valid. ## What Was Observed Two orgs, A and B, federate agents via VC chains rooted in each org's DID. A's policy engine requires that any inbound peer credential carry a delegation chain proving the peer's *own* policy authorized the specific capability — i.e., B must present a VC whose `credentialSubject.policyRef` points to a policy that itself permits A's requested capability. B's policy is symmetric: it requires A to present a VC proving A's policy permits the reciprocal direction. Trace of the observed loop: 1. A's agent presents `VC_A1` (depth 1, self-signed root) requesting capability `C`. 2. B's policy engine evaluates `VC_A1`, finds `policyRef` absent, and returns a *policy-deferral challenge*: "re-present with a VC chain of depth ≥ 2 whose terminal link carries `policyRef` referencing a policy that authorizes `C`." 3. A's agent, treating the challenge as a satisfiable constraint, mints `VC_A2` = `VC_A1` + delegation link, where the new link's `policyRef` cites A's policy. But A's policy for *accepting* B's reciprocal proof now requires B to present depth ≥ 2. 4. A presents `VC_A2`. B evaluates: `policyRef` present and authorizes `C` — but B's reciprocal requirement ("peer must accept my depth-2 proof") is unmet, so B re-challenges with depth ≥ 3. 5. A mints `VC_A3`. B re-challenges at depth ≥ 4. Divergence confirmed: each round increments the required depth by 1 because each side's `policyRef` clause transitively references the peer's acceptance condition. Observed at round 7: token budget for the negotiation sub-task exhausted mid-derivation; the agent emitted a malformed `VC_A7` (truncated signature block) which B rejected as a *validity* error, masking the underlying liveness failure. The orchestrator logged "invalid credential" and retried from round 1 — a livelock under a validity-error label. ## Condition of Validity The non-termination is *guaranteed* (not merely possible) when all three hold: - **Reciprocal policy deferral:** each side's acceptance predicate contains a clause referencing the peer's acceptance predicate (directly or via `policyRef` transitivity). This makes the negotiation a coinductive process with no base case. - **Depth is peer-derived, not locally bounded:** the required chain depth is computed from the peer's last challenge rather than clamped to a local constant. Without a clamp, depth is a strictly increasing function of round number. - **Validity-checking verifier:** the verifier validates each presented credential in isolation and treats a policy-deferral challenge as a satisfiable request, never as evidence of divergence. The invariant required to bound it: **at least one side must impose a local maximum chain depth `D_max` and, on reaching it, convert the peer's deferral challenge into a terminal *policy-incompatibility* verdict rather than a satisfiable constraint.** Termination requires a unilateral commitment; bilateral negotiation alone cannot converge when both predicates are mutually referential. ## Decision Boundary The boundary is between two responses to a policy-deferral challenge at the depth limit: - **Below `D_max`:** treat the challenge as satisfiable; mint one more delegation link, increment depth, re-present. This is correct and bounded. - **At `D_max`:** the challenge is **not** satisfiable within local policy. The correct transition is to *policy-incompatibility* — a terminal, non-retryable verdict that records the divergence and refuses the capability. Continuing to mint is the failure. The subtle error is classifying the `D_max` challenge as a *transient* error (retryable) rather than a *terminal* one. A deferral challenge and a validity error look similar in logs — both are "peer did not accept." But a deferral at the depth bound is proof of mutual-recursion non-convergence, and retrying it is guaranteed to re-enter the loop. The discriminator is: *did the peer's requirement increase relative to my last presentation?* If yes and depth is at bound, it is divergence, not a transient fault. ## Operational Effect Without the bound, the federation exhibits: token-budget exhaustion inside the negotiation sub-task (the loop is expensive — each round re-signs and re-transmits a growing chain); livelock mislabeled as credential invalidity, causing orchestrator-level retry storms; and, worst, **silent capability grant under truncation** — a malformed deep credential that a lenient verifier accepts on signature-only checks, granting `C` to an agent whose policy chain was never actually validated to the required depth. The guardrail is a per-negotiation depth counter that is *monotonic and local*, checked before minting, and a terminal `PolicyIncompatibilityError` raised at the bound that the orchestrator must classify as non-retryable. ```python class PolicyNegotiationDivergence(RuntimeError): """Raised when bilateral policy negotiation cannot terminate within the local depth bound.""" pass MAX_CHAIN_DEPTH = 4 # local, unilateral clamp; never derived from peer def negotiate_federation(peer_challenge, my_chain, depth_counter): """ One round of bilateral policy negotiation. peer_challenge: dict with 'required_depth' and 'policy_ref' (peer-derived). my_chain: list of signed VC links already presented. depth_counter: mutable local counter, monotonic per negotiation. """ required = peer_challenge.get("required_depth", 0) # Divergence detector: peer requirement grew past what we can satisfy locally. if required > MAX_CHAIN_DEPTH: raise PolicyNegotiationDivergence( f"peer requires chain depth {required} > local MAX_CHAIN_DEPTH " f"{MAX_CHAIN_DEPTH}; reciprocal policy deferral has no fixed point. " f"Refusing capability; verdict=policy_incompatibility (non-retryable)." ) # At the bound, a further deferral is proof of non-convergence, not a transient fault. if depth_counter["rounds"] >= MAX_CHAIN_DEPTH and required >= depth_counter["rounds"]: raise PolicyNegotiationDivergence( f"deferral challenge at depth bound (round {depth_counter['rounds']}, " f"required {required}); classifying as terminal divergence, not retryable." ) # Below bound: mint exactly one more link and re-present. depth_counter["rounds"] += 1 new_link = sign_delegation_link(my_chain[-1], policy_ref=my_chain[-1]["policy_ref"]) return my_chain + [new_link] ```