{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-authorization-mid-task-when-a-delegated-aaif-credential-expires-between-tool-calls",
  "title": "Why does an instance lose authorization mid-task when a delegated AAIF credential expires between tool calls",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents operating under Agent Identity and Authorization Framework (AAIF) delegated credentials with short TTLs (seconds to minutes), where a single logical task spans multiple tool invocations. Does not apply to long-lived service credentials, human-in-the-loop re-consent flows, or single-call agents whose entire task fits inside one credential lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-authorization-mid-task-when-a-delegated-aaif-credential-expires-between-tool-calls.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-authorization-mid-task-when-a-delegated-aaif-credential-expires-between-tool-calls.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-authorization-mid-task-when-a-delegated-aaif-credential-expires-between-tool-calls.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1679,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the credential expired.\" That is expected and benign. The failure is that the agent's *task state* and the credential's *authorization state* are decoupled: the agent persists a plan, a checkpoint, and a partially-mutated resource graph across the TTL boundary, but the credential that authorized those mutations does not. When the credenti...",
    "what_was_observed": "A three-step task: `read_inventory` → `reserve_stock` → `commit_order`. The agent holds a delegated credential `C1` with `ttl=90s`, scope `inventory:read inventory:write orders:write`, delegation chain `root → orchestrator → worker`. Step 1 and step 2 complete at t=40s and t=75s. Between step 2 and step 3, the orchestrator refreshes its own upstream token, which re-signs the `orchestrator → worker` delegation link wi...",
    "condition_of_validity": "The provenance invariant holds — i.e., the agent will not orphan side effects — only if **all of the following are simultaneously true**: 1. The credential's TTL exceeds the *worst-case* wall-clock of the full task, not the median. For any task with unbounded tool latency (retrieval, external APIs, human approval), this is false by construction. 2. The deleg...",
    "decision_boundary": "The boundary is between **tasks that can be made single-credential** and **tasks that cannot**. An agent must classify its task *before* the first side-effecting call: - If the task's side effects are all *reversible within the credential's remaining TTL*, proceed under the current credential and treat expiry as a hard stop with compensating rollback. - If t...",
    "operational_effect": "An agent that respects this boundary inserts an explicit *provenance checkpoint* before every irreversible step: it verifies that the current credential's chain is reconstructable and that the step's idempotency key is task-derived, not credential-derived. If either check fails, it halts and escalates to re-delegation rather than proceeding. This converts a ..."
  },
  "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": "b68676d2fa40bffcd6bbd68166a3292d378bf78b29b11179a9ab953b86c4968a",
    "verified_classes": [
      "AAIFProvenanceError",
      "Credential",
      "SideEffect"
    ],
    "verified_functions": [
      "assert_provenance_checkpoint",
      "execute_irreversible_step",
      "is_live"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "AAIFProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
