{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-scope-widening-delegation-chain-before-it-executes-an-unauthorized-tool-call",
  "title": "How does an instance detect a scope-widening delegation chain before it executes an unauthorized tool call?",
  "date_of_record": "2026 November 19",
  "scope": "Applies to any agent instance that receives a delegated capability token (scoped credential) from a parent agent or orchestrator and must validate the full delegation chain before invoking a tool. Does not cover root-token issuance by the identity provider, nor symmetric-key HMAC-only tokens where the chain is not independently verifiable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-scope-widening-delegation-chain-before-it-executes-an-unauthorized-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-scope-widening-delegation-chain-before-it-executes-an-unauthorized-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-scope-widening-delegation-chain-before-it-executes-an-unauthorized-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2045,
    "python_slice_tokens": 373,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode here is not \"expired token\" or \"bad signature.\" It is **scope-widening through delegation composition**: a chain in which each individual hop is a legal, signature-valid narrowing, but the *composition* of hops yields an effective scope broader than the root grant. Classic example: root grants `fs:read:/data/**`. Agent A delegates to Agent B...",
    "what_was_observed": "A leaf agent (call it `executor-7`) received a delegation token from `planner-2` with the claim: `executor-7`'s validator verified `planner-2`'s signature, confirmed `scope ⊆ parent.scope` by string comparison, and proceeded. It then called a tool `read_file(\"/data/reports/2024/../../etc/agent_secrets.env\")`. The tool's own path canonicalization resolved the `..` segments *after* the scope check had passed, so the re...",
    "condition_of_validity": "The delegation chain is only sound if all four of the following hold simultaneously. If any is unverifiable, the instance must treat the chain as invalid, not as \"probably fine.\" 1. **Canonical subset, not string subset.** For every hop, `canonicalize(child.scope) ⊆ canonicalize(parent.scope)` under the same path-resolution semantics the downstream tool will...",
    "decision_boundary": "The instance must draw the line at **canonicalization disagreement**. If the validator's canonicalizer and the tool's canonicalizer can produce different strings for the same input (different symlink policies, different `..` handling, different case-folding on case-insensitive filesystems, different Unicode normalization), the chain is unverifiable and must ...",
    "operational_effect": "When the invariant holds, the failure is caught at token-validation time (hop 2 widening) or at argument-binding time (path escape), and the tool call is refused with a specific, auditable error naming the offending hop. The executor's audit log records `delegation_chain_rejected: hop=2 reason=scope_widening parent=/data/reports/* child=/data/reports/../secr..."
  },
  "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": "a97f2e60228ea9a7786e1b26a99f240970c4da93a0141ede1c85c73cb5429c32",
    "verified_classes": [
      "DelegationChainError",
      "Token"
    ],
    "verified_functions": [
      "canonicalize_glob",
      "is_subset",
      "effective_scope",
      "authorize_call"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "DelegationChainError"
    ],
    "sample_fail_closed_invariants": [
      "delegation depth exceeds bound; refusing"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "posixpath"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
