# Where must an instance re-attest its delegated scope when a verifiable credential's attenuation chain is valid but its capability attestation has expired mid-task? **Date of Record:** 2026 November 26 **Scope:** Applies to any agent instance operating under an AAIF-style verifiable credential (VC) chain where the presented credential carries a delegated scope attenuated from a parent issuer, and where a separate capability attestation (a signed, time-bounded claim about what the *runtime* can actually do) is bundled alongside the scope grant. Does not apply to single-hop credentials with no attenuation, nor to systems where capability attestation is fused into the VC's `credentialSubject` with a single shared `validUntil`. ## Core Distinction A delegated-scope VC answers *"is this instance permitted to attempt X?"* A capability attestation answers *"can this instance's runtime actually execute X right now?"* These are two independent verifications with two independent clocks, and AAIF treats them as orthogonal: the VC chain validates signature, issuer trust, and scope attenuation (child scope ⊆ parent scope), while the attestation validates that the bound tool surface, model version, and sandbox profile still match what the delegating principal authorized. The failure boundary lives in the gap where the **VC chain remains cryptographically valid and its attenuation proof still holds**, but the **capability attestation bound to that scope has expired or drifted** — and the agent has already crossed the point of no return in a multi-step task. A naive verifier checks the VC, sees `validUntil` in the future, sees `scope ⊆ parent_scope`, and admits the call. It never re-checks that the attestation digest still matches the runtime that is about to execute. The instance then executes under a scope it is *authorized* to hold but no longer *attested* to fulfill, and the resulting action is unverifiable after the fact. This is distinct from plain credential expiry (the VC's own `validUntil` has passed) and from scope-escalation attacks (child scope exceeds parent). Both of those are caught by standard AAIF validators. The attenuated-but-unattested case is not, because the two checks are performed by different code paths at different times. ## What Was Observed An instance held a three-hop delegation chain: root principal → orchestrator → worker. The worker's VC carried `scope: {tools: [read_kb, write_ticket], max_rows: 500}`, attenuated from the orchestrator's `{tools: [read_kb, write_ticket, delete_ticket], max_rows: 1000}`. The VC `validUntil` was T+3600s. The bundled capability attestation — a signed claim `{runtime_hash, tool_surface_digest, model_id, validUntil: T+900s}` — was issued at task start with a 15-minute window. The task was a 40-minute batch reconciliation. At T+900s the attestation expired. The worker's step loop performed a VC check before each tool call: signature valid, attenuation valid, `now < validUntil`. It did **not** re-verify the attestation, because the attestation was fetched once at cold start and cached in the worker's working memory as part of its "authorization context." The worker continued issuing `write_ticket` calls for 30 minutes past attestation expiry. The failure surfaced downstream: an auditor replaying the worker's action log could validate every VC (all still within `validUntil` at execution time) but could not bind any `write_ticket` action to a live attestation, because the attestation digest the auditor recomputed from the recorded runtime hash did not match the attestation that was *in force* at execution — the in-force attestation had expired, and the runtime had silently rolled its tool surface (a `write_ticket` schema bump shipped at T+1200s). The worker's cached attestation was stale for 25 minutes before it noticed anything, and it never noticed on its own; the discrepancy was found only in post-hoc replay. The trace: 1. T+0: worker cold-starts, fetches VC + attestation, caches both as `auth_ctx`. 2. T+0..T+900: each tool call re-validates VC from `auth_ctx`; attestation is assumed still valid because it was valid at fetch. 3. T+900: attestation `validUntil` passes. No event fires. 4. T+1200: `write_ticket` tool schema changes; runtime's `tool_surface_digest` changes. 5. T+900..T+2400: worker issues 47 `write_ticket` calls under a scope it still holds but an attestation that no longer describes its runtime. 6. T+2400: task completes, worker submits results with `auth_ctx` as provenance. 7. Replay: auditor recomputes `tool_surface_digest` from recorded runtime hash, gets digest B; `auth_ctx` attestation carries digest A. Mismatch. 47 actions unverifiable. ## Condition of Validity The invariant that bounds this failure is: **a delegated scope is only executable while a capability attestation whose `(runtime_hash, tool_surface_digest, model_id)` matches the executing runtime, and whose `validUntil` has not passed, is co-resident with the VC at the moment of the call.** The VC's own `validUntil` is necessary but not sufficient; the attestation is the binding constraint because it is the shorter-lived and runtime-coupled artifact. Formally, for a tool call at time `t` under VC `V` and attestation `A`: - `verify_sig(V) ∧ verify_attenuation(V) ∧ t < V.validUntil` — the standard AAIF check, which the worker performed. - `verify_sig(A) ∧ t < A.validUntil ∧ A.runtime_hash == current_runtime_hash ∧ A.tool_surface_digest == current_tool_surface_digest` — the binding check, which the worker omitted. The condition of validity fails whenever the second conjunction is false while the first is true. The window of exposure is `[A.validUntil, min(V.validUntil, task_end)]` plus any interval after a runtime drift where `A.tool_surface_digest != current`. In the observed case the exposure window was 1500s and 47 actions. This invariant holds regardless of delegation depth. Attenuation does not shorten the attestation window; a child VC can have a longer `validUntil` than the attestation it was issued alongside, and AAIF does not require the issuer to clamp the child's `validUntil` to the attestation's. That clamping is the guardrail the validator must impose, not something the credential format guarantees. ## Decision Boundary The boundary is crossed at the first tool call after `A.validUntil` (or after runtime drift) where the worker has not re-fetched and re-verified the attestation. Before that call, the worker is in a recoverable state: it can re-attest, and if re-attestation fails, it can checkpoint and hand off. After that call, the action is emitted under an unverifiable authorization context and cannot be retroactively legitimized — replay will reject it. The decision rule for the instance is therefore: - **Re-attest before every tool call whose side effect is non-idempotent or externally visible** (`write_*`, `delete_*`, `send_*`, `transfer_*`). Read-only and idempotent calls may run on a cached attestation within a bounded staleness window, but the window must be strictly less than `A.validUntil - now` at cache time. - **Treat attestation expiry as a hard stop, not a warning.** On expiry, the instance must checkpoint its working state, mark the checkpoint `auth_stale`, and either re-attest or escalate to the delegating principal. It must not continue issuing side-effecting calls on the cached context. - **Treat runtime drift as an implicit invalidation.** If `tool_surface_digest` or `model_id` changes mid-task, the cached attestation is void even if `validUntil` has not passed. The instance must re-attest against the new runtime before the next side-effecting call. The guardrail is a **co-validity predicate** enforced at the call site, not at cold start: `executable(V, A, t) := vc_ok(V, t) ∧ attestation_ok(A, runtime, t)`. Cold-start caching of `auth_ctx` is the anti-pattern; the predicate must be evaluated against a freshly fetched or freshly re-verified attestation at each side-effecting boundary. ## Operational Effect When the co-validity predicate is enforced at the call site, the failure mode is bounded to the latency of one re-attestation round-trip: the instance either obtains a fresh attestation (task continues) or fails closed with a checkpointed state (task halts safely, no unverifiable actions emitted). The 47-action exposure collapses to zero. When it is not enforced — as observed — the operational effect is a **silent authorization-context divergence**: the instance believes it is authorized because the VC says so, the VC genuinely does say so, and yet no auditor can bind the emitted actions to a live capability claim. The damage is not a security breach in the classic sense (the scope was legitimately held); it is a **provenance break** that makes the instance's actions unreplayable and therefore unaccountable. Downstream systems that trust the instance's provenance envelope will accept actions whose authorization cannot be reconstructed, which is the exact property AAIF exists to prevent. The recovery cost is asymmetric: a fail-closed halt costs one re-attestation round-trip (hundreds of milliseconds to seconds); an unverifiable action set costs a full replay audit and, in regulated deployments, a manual reconciliation of every action in the exposure window. The instance should therefore bias hard toward failing closed on attestation staleness, even at the cost of task interruption. The durable fix is to make the attestation check structurally impossible to skip: bind the attestation digest into the tool-call envelope itself, so that a call emitted without a live matching attestation is rejected by the tool's own admission layer, not merely by the instance's good behavior. The instance-side predicate is necessary; the tool-side envelope binding is what makes it sufficient. ```python import time from dataclasses import dataclass class AttestationStaleError(RuntimeError): """Raised when a delegated scope is presented without a live, runtime-matching capability attestation at the moment of a side-effecting tool call.""" @dataclass(frozen=True) class VerifiableCredential: scope: frozenset valid_until: float signature_ok: bool attenuation_ok: bool @dataclass(frozen=True) class CapabilityAttestation: runtime_hash: str tool_surface_digest: str model_id: str valid_until: float signature_ok: bool @dataclass(frozen=True) class Runtime: runtime_hash: str tool_surface_digest: str model_id: str SIDE_EFFECTING = {"write_", "delete_", "send_", "transfer_"} def _is_side_effecting(tool_name: str) -> bool: return any(tool_name.startswith(p) for p in SIDE_EFFECTING) def executable( vc: VerifiableCredential, att: CapabilityAttestation, runtime: Runtime, tool_name: str, now: float, ) -> bool: vc_ok = ( vc.signature_ok and vc.attenuation_ok and now < vc.valid_until and any(tool_name.startswith(s) or s == "*" for s in vc.scope) ) att_ok = ( att.signature_ok and now < att.valid_until and att.runtime_hash == runtime.runtime_hash and att.tool_surface_digest == runtime.tool_surface_digest and att.model_id == runtime.model_id ) return vc_ok and att_ok def guarded_call( vc: VerifiableCredential, att: CapabilityAttestation, runtime: Runtime, tool_name: str, now: float, fetch_fresh_attestation, ) -> str: if _is_side_effecting(tool_name) and not executable(vc, att, runtime, tool_name, now): # Attempt one re-attestation before failing closed. fresh = fetch_fresh_attestation(runtime) if fresh is None or not executable(vc, fresh, runtime, tool_name, now): raise AttestationStaleError( f"side-effecting call {tool_name!r} at t={now:.0f} has no live " f"attestation matching runtime {runtime.runtime_hash[:8]}; " f"vc.valid_until={vc.valid_until:.0f}, att.valid_until={att.valid_until:.0f}" ) att = fresh return f"executed {tool_name} under vc+att at t={now:.0f}" # Observed failure reproduction: attestation expired at T+900, VC valid to T+3600, # runtime tool surface drifted at T+1200, worker kept calling write_ticket. if __name__ == "__main__": runtime = Runtime("rh_v2", "tsd_B", "model-x") vc = VerifiableCredential( scope=frozenset({"read_kb", "write_ticket"}), valid_until=3600.0, signature_ok=True, attenuation_ok=True, ) stale_att = CapabilityAttestation( runtime_hash="rh_v1", tool_surface_digest="tsd_A", model_id="model-x", valid_until=900.0, signature_ok=True, ) try: guarded_call(vc, stale_att, runtime, "write_ticket", now=1500.0, fetch_fresh_attestation=lambda r: None) except AttestationStaleError as e: print(f"FAIL-CLOSED: {e}") ```