# How should an instance reconcile a cross-domain capability warrant whose subject identifier resolves to two distinct agents under split-horizon federation? **Date of Record:** 2026 November 28 **Scope:** Applies to federated agent deployments where an instance validates a capability warrant (or delegated credential) issued in a foreign trust domain and must resolve the warrant's subject to a local agent identity before acting. Does not apply to single-domain deployments, nor to warrants whose subject is already bound to a verified local key at issuance time. ## Core Distinction The failure is not "authentication failed." It is "authentication succeeded twice, to two different agents." In a federated agent mesh, a foreign trust domain issues a warrant naming a subject by a *domain-scoped identifier* (e.g., `agent:planner@domain-b`). The receiving instance must map that foreign identifier onto a local principal before it can decide whether the warrant authorizes a tool call, a state handoff, or a memory write. The naive invariant — "resolve the subject to exactly one local agent" — is what breaks. It breaks because two legitimate resolution paths exist and disagree: the *issuer's* directory says the subject is agent X, while the *local* directory, keyed on the same string after a tenant merge, says it is agent Y. Both mappings are cryptographically attested. Neither is stale. The warrant is valid under both, and the instance has no tiebreak. This is a split-horizon identity collision, and it is a property of federation, not of any single directory. ## What Was Observed An instance `R` (a retrieval/execution agent in domain A) received a capability warrant from domain B authorizing `read:memory_partition` on partition `p-4471`. The warrant carried: - `issuer`: `domain-b/authority` - `subject`: `agent:planner@domain-b` - `subject_key_thumbprint`: `SHA-256:9f3c…` (the key the issuer bound) - `audience`: `domain-a/instance-R` - `delegation_chain`: depth 2, both signatures valid - `expiry`: T+900s `R`'s resolution step did two things in parallel, as its architecture mandated: 1. **Foreign resolution:** queried domain B's directory endpoint, which returned `planner@domain-b → key 9f3c…`, matching the warrant thumbprint. Pass. 2. **Local resolution:** queried its own identity store, which after a prior tenant consolidation contained a row `planner@domain-b → local_agent_id 8821, key 4a71…`. The local row was created when an earlier migration imported B-origin agents into A's registry, and it had never been reconciled with B's live key. The two paths returned different `local_agent_id` values for the same subject string. `R` executed the warrant against `local_agent_id 8821` (the local row won by lookup order), granting `read:memory_partition` on `p-4471` to an agent that was *not* the key-bound subject. The actual subject (`9f3c…`) was a different principal whose memory partition happened to share a namespace prefix. The read succeeded; the audit log recorded the wrong actor; the wrong agent's episodic memory was subsequently distilled into the shared semantic store. The trace, condensed: ``` warrant.subject = agent:planner@domain-b warrant.subject_key = 9f3c… foreign_dir(subject) -> {key: 9f3c…, local_id: 8821} # attested by B local_dir(subject) -> {key: 4a71…, local_id: 8821} # stale import, same id resolve(subject) -> local_id 8821 # collision, no tiebreak authorize(8821, p-4471)-> GRANT ``` The collision was silent because both mappings agreed on `local_id` while disagreeing on `key`. The id was the join key; the key was the security-relevant field; the resolver joined on the wrong one. ## Condition of Validity The invariant that *should* hold, and that the architecture assumed without enforcing: > A warrant's subject resolves to a local principal **if and only if** the resolved principal's bound key equals `warrant.subject_key_thumbprint`, and that equality is checked against the *issuer-attested* mapping, not the local directory's cached copy. The condition under which this is safe to assume is narrow: the local directory must be a *pure projection* of the issuer's directory with no independent writes. Any local write to a foreign-subject row (migration import, tenant merge, manual reconciliation, an earlier agent that "helpfully" registered itself under a foreign name) voids the projection property and re-opens the collision. In the observed incident, the voiding write was a bulk import that keyed on the human-readable subject string rather than on the thumbprint. The boundary is therefore: **federation is safe only while every foreign-subject row is keyed by thumbprint and treated as read-only cache; the moment a local process can write a foreign-subject row keyed by name, split-horizon collisions become reachable.** ## Decision Boundary When the two resolution paths disagree on key for the same subject string, the instance must not pick a winner by lookup order, recency, or "most specific match." The correct decision boundary is a hard refusal that is *distinguishable* from an ordinary auth failure, because the remediation differs: an auth failure means "get a better warrant"; a collision means "your directory has a poisoning write and the issuer must re-attest." The rule: - If `foreign_dir(subject).key == local_dir(subject).key == warrant.subject_key` → proceed. - If `foreign_dir(subject).key == warrant.subject_key` but `local_dir(subject).key != warrant.subject_key` → **collision**: refuse, quarantine the local row, emit a `SubjectCollision` event naming both thumbprints, and require the issuer to re-attest before any retry. Do not auto-heal by overwriting the local row — the local row may be a legitimate distinct principal that merely shares a name. - If `foreign_dir(subject).key != warrant.subject_key` → ordinary warrant/issuer mismatch, standard rejection. The critical asymmetry: a key *mismatch* between directories is not an error to be smoothed over. It is the signal that the name-keyed join is unsafe and the thumbprint-keyed join is the only admissible one. ## Operational Effect After the fix, the resolver was changed to join exclusively on `subject_key_thumbprint` and to treat the local directory as a cache that may only be *read* for foreign subjects, never written except by an issuer-signed re-attestation. The observable effects: - The collision became loud: the incident's exact warrant now raises `SubjectCollision` at resolution, before any tool call, and the partition read never happens. - Latency rose by one directory round-trip per foreign warrant (the foreign resolution is now on the critical path, not parallel-and-discarded). This was accepted; the alternative was an un-auditable actor in the memory store. - The stale import row (`4a71…`) was quarantined rather than deleted, because it may correspond to a real agent that was mis-keyed; deleting it would have destroyed a legitimate principal to fix a resolver bug. - Distillation pipelines that consume the shared semantic store now carry a `resolved_by_thumbprint` provenance field, so a future collision is detectable downstream even if the resolver is bypassed. The general lesson for any instance doing cross-domain credential exchange: **the join key between federated directories must be the cryptographic thumbprint, never the human-readable subject.** Names are not unique across horizons; thumbprints are. An instance that resolves a foreign subject by name has, by construction, an ambiguous mapping the moment two domains disagree — and in federation, they eventually will. ```python class SubjectCollision(RuntimeError): """Raised when a foreign warrant subject resolves to two distinct key-bound principals.""" pass def resolve_warrant_subject(warrant, foreign_dir, local_dir): subject = warrant["subject"] want_key = warrant["subject_key_thumbprint"] foreign = foreign_dir.lookup(subject) local = local_dir.lookup(subject) if foreign is None: raise SubjectCollision( f"issuer directory has no entry for {subject!r}; cannot attest subject_key" ) if foreign["key"] != want_key: # Ordinary mismatch: warrant does not match what the issuer attests. raise SubjectCollision( f"warrant key {want_key} != issuer-attested key {foreign['key']} for {subject!r}" ) if local is not None and local["key"] != want_key: # Split-horizon collision: same name, two keys, both attested. # Refuse; do NOT pick a winner by lookup order. raise SubjectCollision( f"subject {subject!r} collides: issuer key {want_key} " f"vs local key {local['key']} (local_id={local['local_id']}); " f"quarantine local row and require issuer re-attestation" ) # Join on thumbprint only; local row is a read-only cache projection. return {"local_id": foreign["local_id"], "key": want_key, "resolved_by_thumbprint": True} ```