{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-of-a-delegated-agent-silently-exceed-its-capability-scope-when-a-token-exchange-refreshes-mid-task",
  "title": "Why does an instance of a delegated agent silently exceed its capability scope when a token exchange refreshes mid-task?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that obtain tool-authorization tokens via on-behalf-of / token-exchange (RFC 8693) flows where a short-lived capability-scoped token is minted from a broader parent credential, and where the token is refreshed transparently during a multi-step task. Does not apply to statically provisioned long-lived API keys or to tokens minted once per task with no mid-task refresh.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-delegated-agent-silently-exceed-its-capability-scope-when-a-token-exchange-refreshes-mid-task.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-delegated-agent-silently-exceed-its-capability-scope-when-a-token-exchange-refreshes-mid-task.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-delegated-agent-silently-exceed-its-capability-scope-when-a-token-exchange-refreshes-mid-task.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1318,
    "python_slice_tokens": 207,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent was granted the wrong scope.\" It is a **scope-substitution at the refresh boundary**: the exchange that mints a *narrowed* child token (the capability-scoped one the planner reasoned about) and the exchange that *refreshes* it are not guaranteed to be the same operation. When the refresh path re-derives the child from the parent...",
    "what_was_observed": "A three-step task: `search_docs` → `read_issue` → `post_comment`. The planner was issued a capability token `T0` scoped to `{docs:read, issues:read}` (comment posting was deliberately excluded; the agent was expected to request a second exchange for `comments:write` at step 3). `T0` had a 90-second TTL. Step 1 and step 2 completed in ~40s. Step 3's reasoning stalled on a tool-output summarization pass (a large issue ...",
    "condition_of_validity": "The invariant that must hold is **refresh idempotence under narrowing**: for any capability handle `h`, `scope(refresh(h)) == scope(mint(h))`. This holds only if the refresh path re-narrows from the *last issued child's recorded scope set*, not from the parent credential's grant. It fails whenever: 1. The refresher is stateless w.r.t. the prior child scope (...",
    "decision_boundary": "The agent (or its supervisor) must treat a scope *widening* across a refresh as a hard fault, not a benign event. The boundary is: - If `scope(T_new) ⊆ scope(T_old)`: accept silently (narrowing refresh is always safe). - If `scope(T_new) ⊋ scope(T_old)`: **abort the current reasoning step**, because the planner's authorization model no longer matches the cre...",
    "operational_effect": "Without the guardrail, least-privilege is a property that holds at `t=0` and decays silently with every TTL expiry. The blast radius is proportional to the number of refreshes in a task and the breadth of the parent grant—long-running tasks with narrow child scopes and broad parent identities are maximally exposed. The fix is architectural, not detective: pe..."
  },
  "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": "35dadb584b4a8cfbdd293a45a819f7865c29a2761183ffc0d1e85710f04f1725",
    "verified_classes": [
      "ScopeWideningOnRefresh",
      "CapabilityHandle"
    ],
    "verified_functions": [
      "guarded_tool_call",
      "accept_refresh"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ScopeWideningOnRefresh"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
