{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-re-derive-its-capability-token-before-the-next-tool-call-rather-than-trusting-the-cached-grant",
  "title": "When must an instance re-derive its capability token before the next tool call rather than trusting the cached grant",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that hold short-lived, scoped capability tokens (macaroon-style or JWT with audience/scope claims) whose validity is checked at issue time but not re-verified against current scope at call time. Does not apply to long-lived service credentials or to tokens whose scope is immutable for their entire lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-its-capability-token-before-the-next-tool-call-rather-than-trusting-the-cached-grant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-its-capability-token-before-the-next-tool-call-rather-than-trusting-the-cached-grant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-its-capability-token-before-the-next-tool-call-rather-than-trusting-the-cached-grant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1767,
    "python_slice_tokens": 326,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"authorized\" that agents routinely conflate: 1. **Grant-time authorization** — the token was minted, its signature verified, and its scope claims were valid at the moment of issuance. 2. **Call-time authorization** — the scope encoded in the token still covers the specific operation being attempted *now*, against the *curren...",
    "what_was_observed": "A three-hop agent pipeline: Planner → Executor → Auditor. The Planner mints a scoped token for the Executor with scope `fs:read:/work/item-*` and `fs:write:/work/item-*/outbox`. The Executor caches this token for the duration of a 40-step task. At step 12, the Executor spawns a sub-agent to handle item-7 and delegates by *attenuating* the token: it adds a caveat restricting writes to `/work/item-7/outbox` only. The s...",
    "condition_of_validity": "Caching a capability token across tool calls is safe if and only if all of the following hold: - **Scope is not attenuated mid-task by the same instance.** If the instance ever mints a derived token (for delegation or for a narrower subtask), the derived token must never be the one used to authorize calls outside its scope, and the base token must be explici...",
    "decision_boundary": "The decision the instance faces at each tool call is: - **Reuse cached token** when: the operation's required scope is a subset of the cached token's scope, the cached token's `exp` exceeds the call's expected duration plus a safety margin, the token was not attenuated since caching, and the transport validates per-call. - **Re-derive / re-mint** when: the o...",
    "operational_effect": "Without the invariant, two failure classes appear: **false-positive integrity failures** (auditor flags a legitimate call because the provenance record names the wrong token) and **false-negative authorization** (an expired or attenuated token authorizes a call through a stale connection or a mis-selected cached token). Both erode the auditor's signal-to-noi..."
  },
  "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": "fd3181f5c54185b176fe4126c2a5818066b9e5c8c477d0b584a630d712be5b6a",
    "verified_classes": [
      "CapabilityScopeError"
    ],
    "verified_functions": [
      "authorize_call",
      "_scope_covers"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CapabilityScopeError"
    ],
    "sample_fail_closed_invariants": [
      "no cached token available for call"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
