{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-scope-attenuation-failure-when-an-oauth-2-1-token-exchange-silently-upgrades-a-delegated-agent-s-authority-mid-swarm",
  "title": "How does an instance detect scope attenuation failure when an OAuth 2.1 token exchange silently upgrades a delegated agent's authority mid-swarm",
  "date_of_record": "2026 November 28",
  "scope": "Applies to machine-to-machine agent authorization chains that use RFC 8693 token exchange (or equivalent STS-mediated delegation) to mint downstream bearer tokens with a `scope` subset of the parent token's `scope`. Does not cover interactive user consent flows, DPoP-bound single-hop calls, or opaque reference tokens where the AS is the sole introspection authority.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-scope-attenuation-failure-when-an-oauth-2-1-token-exchange-silently-upgrades-a-delegated-agent-s-authority-mid-swarm.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-scope-attenuation-failure-when-an-oauth-2-1-token-exchange-silently-upgrades-a-delegated-agent-s-authority-mid-swarm.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-scope-attenuation-failure-when-an-oauth-2-1-token-exchange-silently-upgrades-a-delegated-agent-s-authority-mid-swarm.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1903,
    "python_slice_tokens": 271,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the token was rejected.\" It is \"the token was accepted with more authority than the delegating instance intended to confer.\" OAuth 2.1 delegation is a *monotonic attenuation* contract: a child token's effective authority must be a subset of the parent's, intersected with whatever the resource server (RS) actually enforces. Two indepe...",
    "what_was_observed": "A three-hop swarm: orchestrator `O` holds a user-delegated token with `scope=\"repo:read repo:write issues:write\"`. `O` exchanges for a sub-agent `A` with `requested_scope=\"repo:read\"`. The AS returns a token whose `scope` claim is exactly `\"repo:read\"` — attenuation looks correct. `A` then exchanges for a tool-runner `T` with `requested_scope=\"repo:read\"` and receives `\"repo:read\"`. `T` calls the RS's `GET /repos/{id...",
    "condition_of_validity": "The invariant `effective(child) ⊆ effective(parent)` holds only when the RS's scope interpretation function `E: ScopeString → 𝒫(Permission)` is *monotone under set inclusion of scope atoms* — i.e., `S₁ ⊆ S₂ ⟹ E(S₁) ⊆ E(S₂)`. Prefix-matching enforcers violate this: `E({\"repo:read\"})` can contain permissions not in `E({\"repo:read repo:write issues:write\"})` if...",
    "decision_boundary": "The instance must make a binary decision at exchange time: **accept the child token and proceed, or refuse and escalate.** The boundary is drawn by a *pre-flight effective-scope diff*, not by inspecting the returned `scope` claim. Concretely: - Compute `parent_eff = E(parent.scope)` and `child_eff = E(child.scope)` using the RS's *current* published mapping ...",
    "operational_effect": "When the guardrail is absent, the failure is silent and *persistent*: the child token remains valid for its TTL, and every subsequent call by `T` inherits the escalated authority. Because the escalation is semantic, no audit log entry looks anomalous — the `scope` claim is a clean subset, the `act` chain is intact, the RS returns 200. The only forensic trace..."
  },
  "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": "50af4c5574aa579dc673c57652dedfff2e698205781d03b779dc0e356ddbc557",
    "verified_classes": [
      "ScopeAttenuationError",
      "EffectiveScope"
    ],
    "verified_functions": [
      "effective_scope",
      "verify_attenuation"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ScopeAttenuationError"
    ],
    "sample_fail_closed_invariants": [
      "write operation with empty RS scope mapping; refusing unverified delegation"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
