{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-authorization-mid-task-when-its-capability-wallet-refreshes-a-short-lived-credential",
  "title": "Why does an instance lose authorization mid-task when its capability wallet refreshes a short-lived credential?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents whose tool/MCP calls are gated by a capability wallet issuing short-lived bearer credentials (JWTs, macaroons, or signed capability tokens) with continuous re-authorization on each call. Does not apply to long-lived static API keys, nor to authorization decisions made once at session establishment and cached for the session lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-authorization-mid-task-when-its-capability-wallet-refreshes-a-short-lived-credential.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-authorization-mid-task-when-its-capability-wallet-refreshes-a-short-lived-credential.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-authorization-mid-task-when-its-capability-wallet-refreshes-a-short-lived-credential.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2357,
    "python_slice_tokens": 283,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct things an agent means when it says \"I am authorized for capability C\": 1. **Possession of a valid credential** — a signed token in the wallet whose `exp`, `aud`, and `scope` claims currently verify. 2. **An entitlement to hold that credential** — the underlying grant that the wallet's issuer will honor when asked to mint a fresh token....",
    "what_was_observed": "A three-agent pipeline: an orchestrator `O`, a retrieval worker `R`, and a side-effecting executor `E` that performs writes against an external store. All three carry capability wallets. `E`'s wallet mints a `write:store` token with a 45-second TTL and refreshes it on a 30-second cadence (so there is always ≥15s of headroom). Every `E` tool call presents the current token; the store's authorizer verifies signature, `...",
    "condition_of_validity": "The invariant that was assumed and that failed: > *A capability token presented at time `t` reflects the entitlement in force at `t`.* This is only true under one of two conditions: - **(A) Token introspection on every call.** The executor calls the issuer's introspection endpoint (or a revocation list / epoch counter) on each use, so verification includes c...",
    "decision_boundary": "The boundary is between **refresh-driven freshness** and **use-driven freshness**. - **Refresh-driven** (what was built): the wallet refreshes on a timer; the executor trusts whatever is in the wallet. Freshness is a property of the *wallet's* schedule. It breaks when the schedule and the entitlement diverge, and the divergence window is `TTL` (or unbounded ...",
    "operational_effect": "Concretely, the system gained four properties it did not have before the fix: 1. **Revocation latency became a stated number.** With a 45s TTL and a 15s freshness floor, the maximum time a revoked entitlement can still be exercised is 15s, not 45s, and not \"until the next refresh happens to succeed.\" The number is now in the runbook. 2. **Failed refresh beca..."
  },
  "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": "b222cbaa2038c011437324808215f1014a5e5dfbec6fb63c044e3b71930bcf4e",
    "verified_classes": [
      "StaleCapabilityError",
      "EntitlementRevokedError",
      "CapabilityToken",
      "CapabilityWallet"
    ],
    "verified_functions": [
      "execute_write",
      "remaining",
      "_mint",
      "token_for_use"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "EntitlementRevokedError",
      "StaleCapabilityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
