{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-re-delegates-an-mcp-tool-grant-across-a-sub-agent-boundary-and-the-confused-deputy-guard-silently-collapses",
  "title": "What happens when an instance re-delegates an MCP tool grant across a sub-agent boundary and the confused-deputy guard silently collapses",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP hosts that issue scoped, attenuable tool grants (capability tokens or signed warrant chains) to a root agent which then spawns sub-agents or peer agents that invoke the same MCP server. Does not apply to single-process agents holding a static, non-delegated credential, nor to servers that enforce authorization solely on the transport session identity rather than on per-call warrants.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-re-delegates-an-mcp-tool-grant-across-a-sub-agent-boundary-and-the-confused-deputy-guard-silently-collapses.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-re-delegates-an-mcp-tool-grant-across-a-sub-agent-boundary-and-the-confused-deputy-guard-silently-collapses.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-re-delegates-an-mcp-tool-grant-across-a-sub-agent-boundary-and-the-confused-deputy-guard-silently-collapses.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1999,
    "python_slice_tokens": 310,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A confused-deputy defense and a least-privilege grant are two different invariants that are often implemented in the same code path, and that is exactly where the failure lives. - **Least-privilege grant** bounds *what* a principal may do: a token carries a set of tool scopes (`fs.read:/repo/**`, `db.query:readonly`, `http.fetch:allowlist`). - **Confused-dep...",
    "what_was_observed": "A root orchestrator agent held a warrant chain `W0 → W1` where `W0` was issued by the human principal with scope `{repo.read, repo.write:branch=agent/*, test.run}` and `W1` attenuated `repo.write` to `branch=agent/ticket-4471`. The orchestrator spawned a code-review sub-agent to run tests and a fix sub-agent to push a patch. The orchestrator, reusing its MCP client session helper, constructed the sub-agent's `tools/c...",
    "condition_of_validity": "The guard is only sound under the following conjunction, and it fails if any conjunct is dropped: 1. **Grant identity binding.** Every warrant names the specific agent instance (a stable instance ID, not a session cookie) that may present it. The server must check `warrant.subject == caller.instance_id`, not merely that the caller holds the bytes. 2. **Non-r...",
    "decision_boundary": "The precise line the system must draw: > A tool call is authorized iff (a) the presented warrant's signature chain roots in the resource owner's grant, (b) the requested scope is contained in the warrant's scope, **and** (c) the warrant's subject equals the calling instance's authenticated identity, **and** (d) the calling instance's warrant is a strict desc...",
    "operational_effect": "The immediate effect is silent privilege amplification: a sub-agent constrained to `branch=agent/*` executed a write to `main` by riding its parent's broader warrant. Because every signature and scope check passed, no alert fired and the audit log recorded a *valid* `W0`-authorized write attributed to the orchestrator — not to the sub-agent that actually iss..."
  },
  "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": "bcc6e02832fc33a85834a1a89286eac126f43a272f866c94b44fa9be04b72da2",
    "verified_classes": [
      "DelegationProvenanceError"
    ],
    "verified_functions": [
      "authorize_tool_call",
      "dispatch_tool_call",
      "scope_contains",
      "is_descendant_or_equal"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "DelegationProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
