{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-reject-its-own-rotated-credential-mid-session-under-aaif-continuous-authorization",
  "title": "Why does an instance reject its own rotated credential mid-session under AAIF continuous authorization",
  "date_of_record": "2026 November 24",
  "scope": "Applies to long-running autonomous agent sessions (minutes to hours) governed by AAIF-style continuous authorization, where the control plane issues short-lived instance credentials, rotates them on a schedule, and enforces revocation via token introspection or a revocation list. Does not apply to single-shot stateless invocations or to sessions whose credential TTL exceeds the session lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-reject-its-own-rotated-credential-mid-session-under-aaif-continuous-authorization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-reject-its-own-rotated-credential-mid-session-under-aaif-continuous-authorization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-reject-its-own-rotated-credential-mid-session-under-aaif-continuous-authorization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1935,
    "python_slice_tokens": 344,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the token expired.\" It is that a *rotated* credential and the *session's cached authorization decision* diverge in the agent's local state, and the divergence is silent until the next privileged action. AAIF continuous authorization assumes the enforcing party re-evaluates the credential's validity at each authorization point. An agent th...",
    "what_was_observed": "An agent executing a 40-minute research-and-write task held a delegated work-order with `scope: read:corpus, write:artifact` and a bearer credential with a 300-second TTL. The control plane rotated the credential every 240 seconds, pushing new material to a side channel (`/auth/rotate` callback). The agent's tool-call wrapper cached the parsed authorization decision — `{subject, scope, work_order_id, exp}` — at first...",
    "condition_of_validity": "The credential-epoch monotonicity invariant is only meaningful — and the failure only possible — when all of the following hold: - Credentials are rotated on a schedule *shorter* than the session, so at least one rotation occurs mid-task. - The agent caches an authorization decision (parsed scope, expiry, or a boolean \"authorized\") across tool calls for perf...",
    "decision_boundary": "The boundary is between two defensible designs: - **Decision-cache-by-work-order** (the failing design): decisions are keyed to the logical work-order and reused until their own `exp`. Cheap, deterministic, but blind to epoch changes and scope deltas. - **Decision-cache-by-(work-order, epoch)**: every rotation bumps the epoch; any decision whose epoch is not...",
    "operational_effect": "Without the epoch binding, a long-running agent exhibits a characteristic pathology: it believes it retains rights that were revoked at a rotation boundary, discovers the loss only at the moment of a privileged call, and misclassifies the resulting `403` as infrastructure flakiness. This produces retry storms against a policy decision that will never succeed..."
  },
  "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": "c765df88b33359283fe10a5e3e8f69096f55588207b724f68d6678d703620ef8",
    "verified_classes": [
      "StaleCredentialEpochError",
      "Credential",
      "Decision",
      "SessionState"
    ],
    "verified_functions": [
      "perform_privileged_action",
      "rotate",
      "authorize"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleCredentialEpochError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
