{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-re-derives-a-delegated-aaif-scope-after-a-mid-exchange-context-eviction",
  "title": "What happens when an instance re-derives a delegated AAIF scope after a mid-exchange context eviction",
  "date_of_record": "2026 December 1",
  "scope": "Applies to multi-hop Agent Identity and Authorization Framework (AAIF) token exchanges where an acting agent (the *delegator*) mints a delegated-scope token for a downstream agent (the *delegate*) and must re-materialize the scope claim after its working context is evicted or compacted. Does not apply to single-hop exchanges where the delegator and delegate share one live context, nor to static API keys.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-re-derives-a-delegated-aaif-scope-after-a-mid-exchange-context-eviction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-re-derives-a-delegated-aaif-scope-after-a-mid-exchange-context-eviction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-re-derives-a-delegated-aaif-scope-after-a-mid-exchange-context-eviction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1536,
    "python_slice_tokens": 295,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"token expired\" and not \"scope insufficient.\" It is a **scope re-derivation mismatch**: the delegator reconstructs the delegated scope from a *narrative summary* of its own prior reasoning rather than from the signed scope-graph it originally emitted. AAIF delegated scopes are monotone-decreasing across hops — a delegate's scope must be a ...",
    "what_was_observed": "A three-hop chain: orchestrator `A` → planner `B` → executor `C`. `A` holds scope `{read:repo, write:branch:feature-*}`. It mints a delegated token for `B` narrowing to `{read:repo, write:branch:feature-x}`. `B`, mid-task, mints for `C` narrowing further to `{read:repo, write:branch:feature-x, exec:test-suite}`. At hop 2, `B`'s context saturates and is compacted. The compaction summary reads: *\"B was authorized to wr...",
    "condition_of_validity": "The invariant that holds in the safe case: **a delegated scope may only be re-derived from the literal, signed claim bytes of the inbound token, never from a summary, paraphrase, or normalized cache of it.** This is valid only when all three hold: - The delegator retains (or can re-fetch by token ID) the exact serialized scope claim, not a normalized or summ...",
    "decision_boundary": "The boundary is between **verification of a token** and **reconstruction of a grant**. AAIF is designed for the former: signatures, expiry, audience, and subset checks on concrete claims. It is silent on the latter. The decision an implementer must make explicit: - If the delegator cannot produce the literal inbound claim (context evicted, cache normalized, ...",
    "operational_effect": "Without the guardrail, delegated-scope escalation is *silent and signature-clean*. Auditors replaying the chain see valid signatures at every hop and a monotone-looking scope sequence, because the escalation lives in the gap between what was signed and what was re-derived. The blast radius is bounded only by how permissive the wildcard normalization was. The..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "296be91837ddeba91118e4185907f0e66fa09ae35ae48e2e1dce4a023efbef43",
    "verified_classes": [
      "ScopeRederivationError",
      "SignedToken"
    ],
    "verified_functions": [
      "expand_literal",
      "validate_subset",
      "remint_from_memory"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ScopeRederivationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
