{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-validate-a-delegated-scope-after-a-token-refresh-and-why-oidc-sub-continuity-is-not-scope-continuity",
  "title": "Where must an instance re-validate a delegated scope after a token refresh, and why OIDC `sub` continuity is not scope continuity",
  "date_of_record": "2026 December 1",
  "scope": "Applies to AAIF deployments where an agent's authorization is expressed as a scoped delegation token (audience-bound, scope-limited, short-TTL) minted against an OIDC-bound agent identity, and where the agent refreshes that token mid-task via an OIDC refresh or client-credentials flow. Does not apply to long-lived static API keys, nor to human-in-the-loop consent flows that re-prompt per action.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-validate-a-delegated-scope-after-a-token-refresh-and-why-oidc-sub-continuity-is-not-scope-continuity.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-validate-a-delegated-scope-after-a-token-refresh-and-why-oidc-sub-continuity-is-not-scope-continuity.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-validate-a-delegated-scope-after-a-token-refresh-and-why-oidc-sub-continuity-is-not-scope-continuity.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1845,
    "python_slice_tokens": 380,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode here is not token expiry and it is not signature forgery. It is the **silent decoupling of identity continuity from scope continuity across a refresh boundary**. OIDC guarantees that the refreshed token's `sub` (and `iss`, `aud`) still resolve to the *same principal*. It does **not** guarantee that the *scope set* attached to that principal ...",
    "what_was_observed": "A research-orchestration agent held a delegation token with scopes `repo:read repo:write issue:comment artifact:upload` and a 15-minute TTL. It executed a 40-step plan: clone, patch, open PR, comment on an issue, upload a build artifact. At step 22 (roughly 14 minutes in) the client library performed a proactive refresh 60 seconds before expiry. The refresh succeeded: HTTP 200, new JWT, valid signature, `sub` byte-id...",
    "condition_of_validity": "The invariant that must hold for safe refresh is: > For every in-flight plan step *s* not yet executed, `scopes(refreshed_token) ⊇ required_scopes(s)`. This is a *plan-level* invariant, not a token-level one. A refresh is only safe if the agent re-validates the *remaining* plan against the *new* scope set before resuming. The conditions under which this inva...",
    "decision_boundary": "The decision the agent must make at the refresh boundary is binary and must be resolved *before* the next tool call, not inferred from the next tool call's response: - **Superset or equal:** resume the existing plan. No re-validation of completed steps needed. - **Strict subset (narrowing):** the plan is partially invalidated. Compute the set of remaining st...",
    "operational_effect": "Downstream, the effect is an **audit discontinuity masquerading as a retry**. Because the operation ultimately succeeded (via stale token), no alert fires on the authorization path. The only trace is that a single logical operation is authorized by two distinct `jti` values with divergent scope claims — detectable only by correlating the audit log against th..."
  },
  "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": "839b48a5d52271f0cacf117cf7d1b94c88f160af3a5b615a2b057a7d26d76205",
    "verified_classes": [
      "ScopeContinuityViolation",
      "DelegationToken",
      "PlanStep",
      "Plan",
      "AgentSession"
    ],
    "verified_functions": [
      "run_session",
      "expired",
      "remaining",
      "refresh",
      "execute_next"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ScopeContinuityViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
