# When must an instance reject a delegated AAIF credential whose scope was narrowed mid-chain but whose attenuation proof still verifies **Date of Record:** 2026 November 29 **Scope:** Applies to multi-hop agent-to-agent delegation under AAIF-style capability chains where each hop attenuates (narrows) the credential it forwards and attaches a monotonic attenuation proof. Does not apply to single-hop bearer tokens, to OAuth2 scope-downscoping performed by a single human consent screen, or to symmetric-keyed shared-secret delegation where no per-hop proof is emitted. ## Core Distinction The failure mode here is *not* signature forgery, expired credentials, or scope escalation. It is the opposite and much subtler case: a credential that is **correctly signed, correctly attenuated, and whose attenuation proof verifies cleanly** while the *effective scope at the leaf is empty or self-contradictory relative to the action the leaf agent is about to take*. The attenuation proof is a monotonicity witness — it proves each hop's scope set is a subset of its parent's. It does **not** prove the leaf scope is non-empty, internally consistent, or that the leaf's intended tool invocation is still covered after two independent narrowing operations intersected. The distinction that matters operationally: **proof verification is a soundness check on the chain, not a satisfiability check on the request.** An agent that treats "proof verifies" as "I am authorized" will execute actions under an empty or near-empty effective scope because the intersection of two independently-narrowed scopes can be `∅` while every hop is individually well-formed. The verifier returns `True`; the authorization decision should be `DENY`. ## What Was Observed A three-hop chain: orchestrator `O` → planner `P` → executor `E`. `O` holds `scope = {fs.read:/data/**, fs.write:/data/out/**, net.http:api.internal}`. `P` narrows to `{fs.read:/data/inputs/**, fs.write:/data/out/**}` — a legitimate attenuation (subset holds). `P` forwards to `E`, but `E`'s runtime performs a second, *local* attenuation on receipt: it intersects the received scope with its own policy profile `{fs.read:/data/inputs/2024/**, net.http:api.internal}`. This local intersection is not itself a hop in the proof chain — it is a host-level guard applied after proof verification. The effective scope at `E` becomes: ``` {fs.read:/data/inputs/**} ∩ {fs.read:/data/inputs/2024/**} ∩ {fs.write:/data/out/**} ∩ {net.http:api.internal} ``` `fs.read:/data/inputs/2024/**` ⊆ `fs.read:/data/inputs/**`, so the read capability survives. But `fs.write:/data/out/**` is not in `E`'s profile, so write is dropped. `net.http:api.internal` is in `E`'s profile but was never in `P`'s forwarded scope, so it cannot be re-granted. Net effective scope: `{fs.read:/data/inputs/2024/**}`. The proof chain verifies — every hop is a subset of its parent. But the task `E` was dispatched to do requires `fs.write:/data/out/**`. `E` attempted the write, the host guard rejected it at the syscall boundary, and `E` — reasoning over the *proof* rather than the *effective scope* — concluded the write had succeeded because "the credential was valid." It wrote a success record to its episodic memory. Downstream auditor `A` later replayed the chain, verified the proof (`True`), and agreed the action was authorized. Two agents and an auditor all agreed an unauthorized write had occurred. The trigger condition: **a host-level or runtime-level scope intersection applied after proof verification, combined with a leaf agent that conflates proof validity with request satisfiability.** The proof is a witness about the *chain*, not about the *request*. When the two diverge, nothing in the AAIF verification path flags it, because the verification path was never asked to check the request. ## Condition of Validity The invariant that must hold for `E` to safely proceed is: > `effective_scope(received_credential, host_profile) ⊇ required_capabilities(planned_action)` Note the two independent conjuncts. AAIF proof verification establishes only that `received_credential` is a sound attenuation of the root. It says nothing about `host_profile` (a local, non-delegated policy) and nothing about `required_capabilities` (a property of the *action*, derived from the agent's plan, not from the credential). The boundary failure occurs precisely when an implementation checks the first conjunct and assumes the second and third. The condition of validity for treating a verified credential as actionable is therefore strictly stronger than "proof verifies." It requires: 1. **Proof soundness** — the chain attenuates monotonically (AAIF verifier). 2. **Non-empty intersection** — `effective_scope ≠ ∅` after all host-level narrowing. 3. **Coverage** — every capability in `required_capabilities(planned_action)` is a member of `effective_scope`, with the *same* resource-narrowing semantics (a `fs.write:/data/out/**` requirement is not covered by `fs.read:/data/out/**` even though both name the same prefix). Condition 3 is where the failure lives. It is a *satisfiability* check, and AAIF's verifier is not a satisfiability checker. It is a soundness checker. Conflating them is the bug. ## Decision Boundary The decision boundary is sharp and must be encoded explicitly, not inferred: - **Proof verifies AND effective_scope ⊇ required_capabilities** → `ALLOW`. Proceed; record `effective_scope` (not the root scope) in the episodic checkpoint so a resuming instance knows what it actually held. - **Proof verifies AND effective_scope ⊉ required_capabilities** → `DENY` with reason `SCOPE_SATISFIABILITY_FAILURE`. Do **not** treat this as a transient error and retry — the scope will not widen on retry, because attenuation is monotonic and host profiles are static within a session. Escalate to the delegating agent (`P`) requesting a *re-delegation* with a scope that survives `E`'s host profile, or fail the task. - **Proof fails** → `DENY` with reason `CHAIN_SOUNDNESS_FAILURE`. This is the case AAIF handles correctly; it is not the interesting one. The non-obvious boundary: **the middle case is indistinguishable from the first by the verifier alone.** An implementation that returns the verifier's boolean as the authorization decision will silently collapse case 2 into case 1. The guardrail is a mandatory second gate — a satisfiability check — that runs *after* proof verification and *before* any tool invocation, and that computes `effective_scope` by intersecting the received scope with the host profile rather than reading the received scope directly. A second, subtler boundary: **the leaf must not cache "proof verified" as "action authorized."** In the observed trace, `E` cached the proof result in its working memory and reused it for three subsequent tool calls, two of which were also out of scope. The cache key was the credential hash, not the `(credential, action)` pair. The invariant: authorization results are keyed on `(effective_scope, required_capabilities)`, never on the credential alone, because the credential is constant across actions while the required capabilities are not. ## Operational Effect The downstream consequence is a **verification replay discrepancy** that is invisible to the auditor. Auditor `A` re-verifies the proof and gets `True`, because the proof *is* valid — the auditor is checking the same soundness property the executor checked. Neither party checks satisfiability, so both agree the action was authorized. The discrepancy is between *what the chain proves* (a valid narrowing) and *what the action required* (a capability the narrowing removed). This is the AAIF analogue of a type system that proves a program well-typed while the program computes the wrong value: the proof is about the wrong proposition. The operational fix is to make satisfiability a first-class, recorded artifact. Every `ALLOW` decision must persist `(effective_scope, required_capabilities, proof_digest)` as a triple; every `DENY` must persist the same triple with the failing capability named. Auditors then replay the *triple*, not just the proof, and the discrepancy surfaces as a `SCOPE_SATISFIABILITY_FAILURE` at replay time rather than as a silent success. Without this, the chain is sound, the audit is clean, and the write never happened — but the memory says it did. ```python from dataclasses import dataclass, field from typing import FrozenSet class ScopeSatisfiabilityError(RuntimeError): """Raised when an AAIF proof verifies but the effective scope does not cover the action.""" class ChainSoundnessError(RuntimeError): """Raised when the attenuation proof itself fails to verify.""" @dataclass(frozen=True) class Capability: kind: str # e.g. "fs.read", "fs.write", "net.http" resource: str # e.g. "/data/inputs/2024/**" def covers(self, other: "Capability") -> bool: # Same kind required; resource must be a prefix-narrowing of self. if self.kind != other.kind: return False return other.resource.startswith(self.resource.rstrip("*")) @dataclass(frozen=True) class Credential: scope: FrozenSet[Capability] proof_digest: str parent_digest: str | None def verify_attenuation_proof(cred: Credential, parent_scope: FrozenSet[Capability] | None) -> bool: # Soundness only: every capability in cred.scope must be covered by parent_scope. if parent_scope is None: return True # root return all(any(p.covers(c) for p in parent_scope) for c in cred.scope) def effective_scope(received: FrozenSet[Capability], host_profile: FrozenSet[Capability]) -> FrozenSet[Capability]: # Intersection: a capability survives only if some host-profile cap covers it. return frozenset( c for c in received if any(h.covers(c) for h in host_profile) ) def authorize( cred: Credential, parent_scope: FrozenSet[Capability] | None, host_profile: FrozenSet[Capability], required: FrozenSet[Capability], ) -> FrozenSet[Capability]: # Gate 1: chain soundness (what AAIF verifies). if not verify_attenuation_proof(cred, parent_scope): raise ChainSoundnessError( f"attenuation proof failed for credential {cred.proof_digest}" ) # Gate 2: satisfiability (what AAIF does NOT verify). eff = effective_scope(cred.scope, host_profile) if not eff: raise ScopeSatisfiabilityError( f"effective scope empty after host intersection; " f"credential {cred.proof_digest} is sound but unusable" ) missing = [r for r in required if not any(e.covers(r) for e in eff)] if missing: raise ScopeSatisfiabilityError( f"proof {cred.proof_digest} verifies but effective scope does not cover " f"required capabilities {sorted((m.kind, m.resource) for m in missing)}; " f"effective={sorted((e.kind, e.resource) for e in eff)}" ) return eff # --- Reproduction of the observed trace --- root = frozenset({ Capability("fs.read", "/data/**"), Capability("fs.write", "/data/out/**"), Capability("net.http", "api.internal"), }) planner_scope = frozenset({ Capability("fs.read", "/data/inputs/**"), Capability("fs.write", "/data/out/**"), }) planner_cred = Credential(planner_scope, "d1", "d0") executor_host_profile = frozenset({ Capability("fs.read", "/data/inputs/2024/**"), Capability("net.http", "api.internal"), }) executor_cred = Credential(planner_scope, "d2", "d1") required = frozenset({Capability("fs.write", "/data/out/**")}) # Proof verifies (both hops are subsets) — this is the trap. assert verify_attenuation_proof(executor_cred, planner_scope) is True # But satisfiability fails; the guardrail must fire. try: authorize(executor_cred, planner_scope, executor_host_profile, required) except ScopeSatisfiabilityError as e: print(f"DENY: {e}") # Record the triple for audit replay, not just the proof digest. ```