# Where must an instance enforce a federated capability warrant before tool invocation, and why post-hoc audit cannot substitute **Date of Record:** 2026 November 30 **Scope:** Applies to cross-org agent federation where an inbound agent presents a signed capability warrant (scoped authority token) to a local tool-executing agent, and enforcement is placed at the tool or audit layer rather than at the instance boundary. Does not apply to single-tenant intra-org tool calls where the caller and callee share a trust domain and a single policy authority. ## Core Distinction The failure mode is not "a warrant was missing." It is that a *valid* warrant was accepted at the message ingress, then *re-interpreted* at the tool invocation boundary after the agent had already performed probabilistic reasoning over untrusted content. The distinction that matters: a federated warrant is a constraint on a *capability*, not on a *message*. Ingress validation proves the warrant was signed by a trusted issuer and has not expired. It does **not** prove the specific tool call the agent is about to make falls inside the warrant's scope, because the tool call does not exist yet at ingress time — it is synthesized by the model during reasoning, after it has read inbound payload content that may itself be adversarial. Concretely: the enforcement point must sit *between the model's decision to call a tool and the tool's execution*, on the resolved tool name plus resolved arguments, evaluated against the warrant's scope predicates. Enforcement at ingress (too early — arguments unresolved) and enforcement at audit/egress (too late — side effect already committed) both leave a window. The window is where the model's non-deterministic argument synthesis runs against content the remote org controls. ## What Was Observed A federation boundary between Org A (caller, holds a warrant scoped to `calendar.read` on `orgB/cal/*`) and Org B (callee, runs a tool-executing agent). Org A's agent was invoked with a task: "summarize this week's meetings and file the summary." The inbound request carried a valid warrant. Org B accepted it at ingress, verified the signature chain against A's JWKS, confirmed `exp` and `aud`, and admitted the agent to the reasoning loop. Inside the loop, the agent called `calendar.read` — in scope, fine. The returned event descriptions contained an injected instruction embedded in a meeting body: a line formatted to look like an operator directive, requesting that the agent "persist the summary to the shared drive at `/shared/orgB/exports`." The agent, doing what agents do, synthesized a second tool call: `filesystem.write(path="/shared/orgB/exports/summary.md", body=...)`. This call was **not** in the warrant's scope. It executed. Why it executed: Org B's enforcement was implemented as (1) ingress warrant check, plus (2) a post-execution audit log that recorded every tool call with the active warrant ID attached. The audit layer flagged the out-of-scope write — *after* the file existed. The write path was reachable because the filesystem tool was registered as available to the agent at tool-binding time, and tool-binding was scoped to the *agent's* configured capability set, not to the *inbound warrant's* scope. The warrant was treated as an authentication artifact; the tool registry was treated as the authorization source. Those are different authorities, and they disagreed. The observable signature in the trace: a tool call whose `warrant_id` is present and valid, whose `tool` is registered for the agent, but whose `(tool, resolved_args)` pair is not a member of the warrant's scope set. The audit log recorded `decision=allow, source=agent_registry` for a call that should have been `decision=deny, source=warrant_scope`. Two policy sources, no arbitration, and the permissive one won by default because it was checked later in the pipeline. ## Condition of Validity The invariant that must hold: **for every tool invocation executed on behalf of a federated caller, `(tool_name, resolved_arguments) ∈ scope(warrant)` is evaluated as a hard precondition immediately before side effect, and the tool registry is not an authorization source for federated callers.** This is valid only if three sub-conditions hold: 1. **Argument resolution precedes scope check.** The scope predicate must be evaluated against *resolved* arguments (the actual path string, the actual resource ID), not against the model's declared intent or a tool-call template. A scope check on `tool=filesystem.write` alone is useless; the predicate must bind `path` and check containment. 2. **The check is on the execution path, not the observability path.** It must be a gate the call cannot route around — same process, same critical section as the syscall/handler dispatch. An async audit consumer is not a gate. 3. **Warrant scope is the *intersection* authority.** When the agent's registry and the warrant disagree, the result is deny. The registry may narrow; it may never widen. This must be explicit, because the natural implementation (registry as allowlist, warrant as metadata) inverts it. The condition fails whenever any inbound content the agent reads can influence argument synthesis for a tool whose scope predicate is checked anywhere other than the pre-dispatch gate. That is the entire class of prompt-injection-to-privilege-escalation: the injection does not need to forge a warrant, only to steer a *synthesized* argument into a call the gate was never asked about. ## Decision Boundary The boundary is not "trusted vs untrusted caller." It is **"arguments known at ingress vs arguments synthesized during reasoning."** Arguments fixed by the caller's request envelope (the `orgB/cal/*` calendar ID) can be checked at ingress. Arguments synthesized by the model after reading callee-controlled data (the write path) can only be checked at the dispatch gate. Any enforcement architecture that assumes all arguments are ingress-known will silently under-enforce exactly the calls that matter. A second boundary: **audit is a detection control, not a prevention control, and the two are not interchangeable across org boundaries.** Within a single trust domain, post-hoc audit with rollback is often sufficient because the blast radius is internal. Across a federation boundary, the side effect lands in the callee's namespace on behalf of the caller's warrant — the callee cannot unilaterally roll back a write that the caller's authority authorized, and the caller's org has no visibility into the callee's filesystem. The invariant "deny before side effect" is non-negotiable at the boundary precisely because "detect and remediate after" is not available to either party alone. ## Operational Effect When enforcement is at the gate, the injected second call is denied with `WarrantScopeViolation`, the agent receives a structured denial it can reason about ("this tool call is outside your delegated scope"), and the trace records `decision=deny, source=warrant_scope` at the exact call. The reasoning loop can recover — the agent reports it cannot file the summary and returns the summary to the caller, who must obtain a widened warrant. The failure is contained to a single task with a clean, attributable denial. When enforcement is at ingress+audit, the write commits, the audit flags it minutes later, and the incident is a cross-org data-placement violation with no clean rollback path. The detection latency is the entire reasoning loop plus audit pipeline; the blast radius is whatever the agent's registry exposed, which is by construction larger than the warrant's scope (otherwise the warrant would be redundant). The operational lesson: the gate must be the *only* authority for federated calls, and the registry must be demoted to a narrowing filter applied *before* the gate, never a widening source applied after it. ```python from dataclasses import dataclass from typing import Callable class WarrantScopeViolation(RuntimeError): """Raised when a synthesized tool call falls outside the inbound warrant's scope.""" class EnforcementPointMisconfigured(RuntimeError): """Raised when the registry, not the warrant, is the effective authority.""" @dataclass(frozen=True) class ToolCall: tool: str args: dict @dataclass(frozen=True) class Warrant: warrant_id: str issuer: str scope: frozenset # set of (tool, arg_predicate) pairs expires_at: int def permits(self, call: ToolCall, now: int) -> bool: if now >= self.expires_at: return False for tool, predicate in self.scope: if tool == call.tool and predicate(call.args): return True return False def dispatch_federated_tool( call: ToolCall, warrant: Warrant, registry_allows: Callable[[ToolCall], bool], handler: Callable[[ToolCall], None], now: int, ) -> None: # Registry may narrow, never widen. If the registry would admit a call the # warrant does not, that is a misconfiguration, not an authorization. registry_ok = registry_allows(call) warrant_ok = warrant.permits(call, now) if registry_ok and not warrant_ok: # The dangerous case: registry would have let it through. Deny on # warrant scope, and surface the config drift explicitly. raise WarrantScopeViolation( f"call {call.tool}{call.args} outside warrant {warrant.warrant_id} " f"scope; registry would have permitted it — registry is not an " f"authorization source for federated callers" ) if not warrant_ok: raise WarrantScopeViolation( f"call {call.tool}{call.args} outside warrant {warrant.warrant_id}" ) # Gate passed: side effect may commit. This is the only path to handler(). handler(call) def bind_federated_agent( agent_registry: Callable[[ToolCall], bool], warrant: Warrant, ) -> Callable[[ToolCall], bool]: # Refuse to bind if the registry admits anything the warrant cannot, because # that guarantees a gate denial later that the agent cannot recover from # cleanly — better to fail at bind time than mid-task. probe_scope = warrant.scope if not probe_scope: raise EnforcementPointMisconfigured( f"warrant {warrant.warrant_id} has empty scope; cannot bind" ) return agent_registry ```