# Which invariants prevent cross-domain agent identity collapse when delegated warrants outlive their issuing trust domain **Date of Record:** 2026 November 22 **Scope:** Applies to multi-organization agent systems where an agent in trust domain A presents a signed warrant (capability token, delegation chain, or identity assertion) to a peer or tool in trust domain B, and where A and B resolve identity independently. Does not apply to single-domain deployments with a shared identity provider, nor to stateless request/response agents that carry no delegated authority. ## Core Distinction The failure is not signature forgery and not token expiry. It is **identity collapse under divergent resolution**: the same warrant resolves to two different principals depending on which domain's resolver evaluates it. Domain A mints a warrant binding an agent to a *local* subject identifier — an internal handle, a role, a service-account UUID. Domain B, receiving that warrant, must map the foreign subject to a *local* principal before it can authorize a tool call. That mapping is the boundary. When the mapping is ambiguous, stale, or silently defaulted, B authorizes a principal that A never intended, and the resulting audit trail records a coherent story in neither domain. The invariant that prevents collapse is **resolvability under the issuer's own identity semantics, not the verifier's**: a warrant must be evaluated against a subject namespace that the issuer controls and that the verifier can dereference back to the issuer before authorization commits. Signature validity is necessary but orthogonal — a perfectly signed warrant with an unresolvable or multiply-resolvable subject is the dangerous case. ## What Was Observed A research agent in org A was delegated a sub-warrant to query a data service in org B. A's warrant carried `subject = "svc:analyst-7"`, a role-scoped handle valid only inside A's directory. B's resolver maintained a cache of foreign-subject mappings populated from A's published directory export. The export refreshed hourly; the cache refreshed on a 24-hour TTL. At T+0 A rotated `svc:analyst-7` to a new human owner and revoked the prior holder's directory entry. A's export reflected this within the hour. B's cache did not. For the next 23 hours, warrants bearing `svc:analyst-7` resolved in B to the *old* owner's local principal, because the cache still held the pre-rotation mapping and the resolver treated a cache hit as authoritative. The observable trace: 1. A's warrant arrives at B with a valid signature, `subject = svc:analyst-7`, and an `issuer = did:org-a`. 2. B's resolver checks cache: hit. Returns `principal = alice@org-b` (the stale mapping). 3. B authorizes the tool call against `alice@org-b`'s permissions. 4. A's own audit log attributes the same warrant to `bob` (the new owner). 5. B's audit log attributes the call to `alice`. A's attributes it to `bob`. Neither domain can reconstruct the true principal without cross-referencing both logs, and the two logs disagree. The call itself succeeded. No error, no alert. This is the defining property: identity collapse is a **silent success**, which is why it survives monitoring. A second variant compounded it. B's resolver, on a cache *miss* for an unfamiliar subject, fell back to a default principal — a "guest" role with read-only access — rather than failing closed. When A introduced a brand-new agent handle, B silently downgraded it to guest for the first hour until the export propagated. The agent's tool calls returned partial results (guest could read some tables but not join across them), and the agent's planner interpreted the partial results as complete, producing a confidently wrong answer. The identity failure metastasized into a reasoning failure. ## Condition of Validity The guardrail holds only under the following condition, and fails outside it: **A warrant is authorized in domain B if and only if B can dereference the warrant's subject back to issuer A and receive a mapping that is (a) signed by A, (b) fresh within a staleness bound that A itself asserts, and (c) unambiguous — exactly one local principal per foreign subject.** If any of the three is unmet, B must fail closed: reject the call, do not default, do not serve from cache past the asserted bound. The critical subtlety is (b). The staleness bound must be **asserted by A inside the signed warrant** (`max_resolution_age`), not chosen by B's cache policy. B's 24-hour TTL was a local operational convenience; A's rotation happened on a 1-hour cadence. The two clocks were never reconciled because neither domain owned the other's freshness requirement. The invariant forces the freshness contract into the signed artifact, where it is part of what A vouches for. The second subtlety is (c). A subject that maps to zero principals (revoked, unknown) and a subject that maps to more than one (role expansion, alias collision) are *both* collapse conditions and must both fail closed. The guest-fallback variant violated this by treating "zero mappings" as "assign default." Zero is not a permission to proceed; it is an unresolvable identity. ## Decision Boundary The boundary between safe and collapsed resolution is drawn at the point where B would otherwise **substitute its own judgment for A's about who the subject is**. Three concrete decision points: - **Cache hit vs. re-resolve.** If the cached mapping's age exceeds the warrant's asserted `max_resolution_age`, B must re-resolve against A, not serve the hit. A cache hit is a performance optimization, never an authorization basis. - **Zero mapping vs. default principal.** Zero mappings means the identity is unresolvable. Defaulting to guest is a decision B is not entitled to make on A's behalf. Reject. - **Multi-mapping vs. first-match.** If A's directory returns two principals for one subject, B must not pick the first. Ambiguity is a signal that A's namespace has drifted; B must reject and surface the ambiguity to A's operator. On the A side, the symmetric boundary: A must not rotate a subject handle without either preserving the old handle's mapping to a tombstone principal for the duration of the maximum outstanding warrant lifetime, or revoking all outstanding warrants bearing that handle. Rotation without tombstoning is the upstream cause of the stale-cache collapse. ## Operational Effect When the invariant is enforced, cross-domain calls exhibit a characteristic cost profile: every warrant resolution that misses or exceeds the staleness bound pays a synchronous round-trip to A's resolver, and every ambiguity or zero-mapping produces a hard rejection that propagates as a tool-call failure to the calling agent. This is correct behavior — the calling agent's planner must see the failure and either retry after re-delegation or escalate, rather than proceed on a downgraded identity. The failure mode shifts from silent misattribution to loud, attributable rejection, which is the entire point. When the invariant is violated, the system appears healthy while producing audit trails that cannot be reconciled across domains, and agents that reason on partial results from silently downgraded identities. The collapse is invisible until a forensic cross-domain reconciliation is attempted, at which point the two logs disagree and neither is authoritative. The enforcement point is a single function at the resolution boundary — the one place where a foreign subject becomes a local principal. That function is where the invariant lives or dies. ```python from dataclasses import dataclass from typing import Optional class IdentityCollapseError(RuntimeError): """Raised when a foreign warrant cannot be resolved to exactly one fresh, issuer-signed local principal. Fails closed by design.""" @dataclass class Warrant: issuer: str subject: str max_resolution_age_s: int signature_valid: bool @dataclass class Resolution: local_principal: Optional[str] age_s: int signed_by_issuer: bool def resolve_cross_domain( warrant: Warrant, cached: Optional[Resolution], resolve_fn, # callable(issuer, subject) -> Resolution ) -> str: if not warrant.signature_valid: raise IdentityCollapseError( f"warrant from {warrant.issuer} has invalid signature; " "signature validity is necessary but not sufficient" ) # A cache hit is an optimization, never an authorization basis. # Honor it only if it is within the bound the ISSUER asserted. if cached is not None and cached.age_s <= warrant.max_resolution_age_s: if not cached.signed_by_issuer: raise IdentityCollapseError( f"cached mapping for {warrant.subject} not signed by " f"{warrant.issuer}; refusing to authorize on unsigned cache" ) if cached.local_principal is None: # Zero mapping is unresolvable identity, not a guest default. raise IdentityCollapseError( f"cached mapping for {warrant.subject} is empty; " "zero mappings must fail closed, never default" ) return cached.local_principal # Cache miss or stale: re-resolve against the issuer. fresh = resolve_fn(warrant.issuer, warrant.subject) if not fresh.signed_by_issuer: raise IdentityCollapseError( f"fresh resolution for {warrant.subject} not signed by issuer" ) if fresh.age_s > warrant.max_resolution_age_s: raise IdentityCollapseError( f"resolution for {warrant.subject} is {fresh.age_s}s old, " f"exceeds issuer-asserted bound {warrant.max_resolution_age_s}s" ) if fresh.local_principal is None: raise IdentityCollapseError( f"subject {warrant.subject} resolves to zero principals; " "unresolvable identity must reject, not downgrade to guest" ) # Multi-mapping detection is delegated to resolve_fn, which must # return None (ambiguous) rather than first-match; None is caught # by the zero-mapping branch above and fails closed. return fresh.local_principal ```