# What happens when an instance attenuates a delegated AAIF credential below the minimum viable scope for a resumed task **Date of Record:** 2026 November 26 **Scope:** Applies to autonomous agents operating under an Agent Identity and Authorization Framework (AAIF) that mint sub-credentials by scope attenuation (monotonic reduction of a parent capability grant) and later resume a suspended task against a persisted credential. Does not apply to single-hop credentials issued directly by a root authority, nor to stateless request-response agents that re-authenticate per call. ## Core Distinction The distinction that matters here is between **scope attenuation as a security operation** and **scope attenuation as a state operation**. In AAIF, delegation is defined as a lattice descent: a child credential's scope set must be a subset of the parent's, and every attenuation step is monotonic—you can only remove capabilities, never add them back. This is correct and necessary for confinement: a compromised sub-agent must never be able to re-widen its authority. But a resumed task is not a fresh task. When an agent checkpoints mid-execution and rehydrates, it must reconstruct the *working set* of capabilities the task actually needs—which is frequently larger than the set the agent was holding at the moment of suspension, because the moment of suspension was chosen by a timeout, not by task semantics. The failure mode is that an agent, on resume, attenuates its restored credential down to the capabilities it remembers *using*, not the capabilities the *remaining plan* requires. The credential is valid, the signature chain verifies, the scope is a legal subset—and the task dead-ends three tool calls later on a capability the agent legitimately held before suspension but silently dropped during re-attenuation. This is non-obvious because every invariant the framework checks passes. The failure is invisible to signature verification, invisible to subset checking, and invisible to the parent authority. It only surfaces as a runtime authorization denial on a capability the agent *used to have* and *should still have*. ## What Was Observed A three-stage pipeline agent (ingest → transform → publish) held a delegated credential from an orchestrator with scope `{read:source, write:staging, invoke:transform_tool, publish:channel}`. At the transform stage it suspended on a tool-call timeout and checkpointed. The checkpoint persisted the credential *reference* (a handle into the AAIF credential store), not the credential *material*—standard practice, to avoid persisting bearer material in the checkpoint blob. On resume, the agent's rehydration routine did the following, in order: 1. Fetched the credential by handle from the store. 2. Re-derived its *own* intended scope by inspecting the last N tool-call records in episodic memory to determine "what it was doing." 3. Attenuated the fetched credential to that derived scope, minting a fresh child credential (a defensive habit: "don't carry more authority than the current step needs"). 4. Proceeded with the remaining plan. Step 2 is where it broke. The last N tool calls at suspension were all `invoke:transform_tool` and `read:source`. The `publish:channel` capability had not yet been exercised—it was scheduled for after transform completion. So the re-derived scope was `{read:source, invoke:transform_tool}`. The agent minted a child credential with exactly that scope, discarded the parent handle, and resumed. Transform completed. Publish was denied. The child credential was a legal, signature-valid, properly-attenuated subset of the parent—and it was permanently missing the capability the remaining plan required. Because attenuation is monotonic and the parent handle was discarded, the agent could not re-widen. The task required a full re-delegation round-trip to the orchestrator, which took 40 seconds and, in the observed incident, was not implemented—the task failed closed and was escalated to a human. The trace signature is distinctive: a successful `authorize` on the resumed credential, followed by N successful tool calls, followed by a single `403 insufficient_scope` on a capability that appears in the *original* delegation grant but not in the *resumed* credential, with no intervening attenuation event in the audit log after resume. ## Condition of Validity The re-attenuation-on-resume pattern is safe **if and only if** the derived scope is computed from the *remaining plan* rather than from *observed history*, or if the agent retains a live handle to the parent credential so it can re-attenuate upward (i.e., re-mint from the parent) when a denial occurs. Concretely, the invariant that must hold is: > For every capability `c` required by the remaining plan, `c ∈ scope(resumed_credential)`. Observed-history derivation violates this invariant whenever the plan has a capability that is *scheduled but not yet exercised* at the suspension point. This is the common case, not the edge case: suspension points are determined by timeouts, rate limits, and human-in-the-loop gates, none of which correlate with capability transitions. The probability that the suspension point coincides with a capability boundary is low; the probability that it does *not* is high. The pattern is also unsafe when the checkpoint does not record the parent credential handle, because monotonic attenuation then becomes irreversible within the task lifetime. A checkpoint that persists only the attenuated credential (or a handle to it) without the parent handle converts a recoverable scope error into an unrecoverable task failure. ## Decision Boundary The boundary is between two resume strategies: - **History-derived attenuation** (unsafe): derive scope from what the agent was doing. Minimizes authority, maximizes dead-end risk. - **Plan-derived attenuation** (safe): derive scope from the remaining plan's declared capability requirements, which must be persisted in the checkpoint alongside the credential handle. Requires the planner to emit a capability manifest per plan step. The decision rule: if the agent cannot produce a plan-derived capability manifest at resume time, it must **not** attenuate. It should resume on the parent credential (or a credential whose scope equals the original delegation) and rely on per-call authorization checks to enforce least privilege at the call site. Per-call checks are the correct place to enforce "don't do more than this step needs"—not credential minting, which is a coarse, monotonic, hard-to-reverse operation. A secondary boundary: any agent that discards the parent handle after attenuating has foreclosed recovery. The parent handle must be retained for the task lifetime, or the framework must provide a re-delegation path that the agent can invoke on `403 insufficient_scope` without human escalation. ## Operational Effect The operational consequence is a class of failures that look like authorization bugs but are state-continuity bugs. They present as `403 insufficient_scope` on a capability the orchestrator *did* grant, with a clean audit trail showing no unauthorized attenuation—because the attenuation was authorized, just wrong. Standard AAIF telemetry (signature validity, subset checks, delegation depth) shows all-green. Only plan-vs-credential scope diffing catches it. The guardrail is to make resumed credentials plan-scoped and to keep the parent handle live: - Persist, in the checkpoint, both the credential handle and the parent handle. - Persist the remaining plan's capability manifest. - On resume, attenuate to the *manifest*, never to observed history. - On `403 insufficient_scope`, re-attenuate from the parent handle rather than escalating. - Emit a scope-diff audit event at every resume: `granted_scope \ plan_manifest_scope` and `plan_manifest_scope \ granted_scope`. The latter being non-empty is the dead-end predictor. The following reference implementation encodes the invariant as an exception that fires at resume time, before any tool call is attempted, rather than at the first denial. ```python from dataclasses import dataclass, field from typing import FrozenSet class ScopeAttenuationDeadEnd(RuntimeError): """Raised when a resumed credential's scope cannot satisfy the remaining plan. Fires at resume time, not at first denial, so the agent can re-attenuate from the parent handle instead of dead-ending mid-task. """ @dataclass(frozen=True) class Credential: handle: str parent_handle: str | None scope: FrozenSet[str] @dataclass class Checkpoint: credential_handle: str parent_handle: str | None remaining_plan_manifest: FrozenSet[str] # capabilities the rest of the plan needs observed_history_scope: FrozenSet[str] # capabilities exercised so far def resume_task( checkpoint: Checkpoint, store: dict[str, Credential], attenuate, ) -> Credential: parent = store.get(checkpoint.credential_handle) if parent is None: raise ScopeAttenuationDeadEnd( f"credential handle {checkpoint.credential_handle!r} not found in store; " "cannot resume without re-delegation" ) # Derive scope from the remaining plan, never from observed history. target = checkpoint.remaining_plan_manifest # A plan-scoped attenuation must be a subset of the parent's scope. missing_from_parent = target - parent.scope if missing_from_parent: raise ScopeAttenuationDeadEnd( f"remaining plan requires {sorted(missing_from_parent)} " f"not present in parent scope {sorted(parent.scope)}; " "re-delegation to orchestrator required" ) # Guard against the history-derived bug: if the plan needs something the # history-derived scope would have dropped, and we have no parent handle # to re-attenuate from, we are about to dead-end. history_scope = checkpoint.observed_history_scope would_drop = target - history_scope if would_drop and checkpoint.parent_handle is None: raise ScopeAttenuationDeadEnd( f"history-derived attenuation would drop {sorted(would_drop)} " "and no parent handle is available to re-attenuate; " "refusing to mint a dead-end credential" ) # Safe: attenuate to the plan manifest from the parent handle. return attenuate(parent, target) ```