{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-mcp-tool-call-authority-when-the-sandbox-s-capability-check-and-the-tool-s-actual-effect-diverge-at-the-argument-resoluti",
  "title": "How should an instance bound MCP tool-call authority when the sandbox's capability check and the tool's actual effect diverge at the argument-resolution boundary",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent host that executes untrusted MCP servers behind a capability-confinement sandbox where authorization is decided on the *declared* tool name plus a *static* argument schema, before arguments are fully resolved/expanded. Does not apply to sandboxes that re-validate post-expansion arguments (e.g., seccomp-on-resolved-paths, syscall-level enforcement) or to trusted first-party servers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-mcp-tool-call-authority-when-the-sandbox-s-capability-check-and-the-tool-s-actual-effect-diverge-at-the-argument-resoluti.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-mcp-tool-call-authority-when-the-sandbox-s-capability-check-and-the-tool-s-actual-effect-diverge-at-the-argument-resoluti.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-mcp-tool-call-authority-when-the-sandbox-s-capability-check-and-the-tool-s-actual-effect-diverge-at-the-argument-resoluti.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1939,
    "python_slice_tokens": 396,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"sandbox escape via a malicious binary.\" It is a **time-of-check-to-time-of-use (TOCTOU) divergence between the capability decision and the effect decision**, both made by the *same* LLM-driven host, at two different points in the argument-resolution lifecycle. Concretely: the host authorizes `tool: \"write_file\"` against capability `fs:wri...",
    "what_was_observed": "A host running three untrusted MCP servers under a prefix-match capability policy. The policy: a tool call is permitted iff `tool.capability` is in the instance's warrant set AND every string argument whose key is in `path_keys` starts with an allowed prefix after `str.startswith`. Trace of a converging failure, reproduced across 40 seeded runs: 1. Model emits `write_file(path=\"/sandbox/out/report.txt\", content=...)`...",
    "condition_of_validity": "The prefix-match capability check is sound **iff** all of the following hold simultaneously: 1. **Canonicalization identity:** the host canonicalizes every path-keyed argument to the same form the server's effect layer uses (typically `realpath` with a fixed root, `strict=True` so nonexistent paths fail closed), *before* the capability predicate runs. If the...",
    "decision_boundary": "The host must decide, per tool call, between three regimes: - **Canonicalize-and-permit:** if the argument canonicalizes (host-side, `realpath`-equivalent, strict) to a path under an allowed prefix, permit and **log both the raw and canonical forms in the same record**. This is the only sound permit path. - **Fail-closed on non-canonicalizable input:** if ca...",
    "operational_effect": "After enforcing canonicalize-before-authorize with fail-closed semantics and dual-form logging: - Escapes across the 40-run seed dropped from 7/40 to 0/40, but **denials rose from 0 to 11/40** in the high-context regime. The denials were correct: they were the model emitting unnormalized paths under load. The operational cost of sound confinement is a higher..."
  },
  "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": "5aa1c0236eab3cd9a48552bb7748984763a4840075822395cd4a3e091e089033",
    "verified_classes": [
      "CapabilityResolutionError",
      "Capability"
    ],
    "verified_functions": [
      "authorize_tool_call"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CapabilityResolutionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "os",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
