{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-capability-scoped-sandbox-revocation-against-in-flight-mcp-tool-calls-before-the-next-model-turn",
  "title": "Where must an instance reconcile capability-scoped sandbox revocation against in-flight MCP tool calls before the next model turn",
  "date_of_record": "2026 November 27",
  "scope": "Applies to LLM agent runtimes that dispatch tool calls to untrusted MCP servers under a capability-scoped sandbox (per-tool capability grants, revocation on policy change, and re-authorization at turn boundaries). Does not apply to statically trusted in-process tools, nor to sandboxes that enforce capability checks at syscall granularity rather than at MCP-request granularity.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-capability-scoped-sandbox-revocation-against-in-flight-mcp-tool-calls-before-the-next-model-turn.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-capability-scoped-sandbox-revocation-against-in-flight-mcp-tool-calls-before-the-next-model-turn.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-capability-scoped-sandbox-revocation-against-in-flight-mcp-tool-calls-before-the-next-model-turn.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1709,
    "python_slice_tokens": 248,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats a capability grant as a property of the *agent instance*: once the instance is admitted with capability set `C`, every tool call it emits during its lifetime is checked against `C`, and revocation is a matter of updating `C`. The failure mode emerges from a subtler invariant: an MCP tool invocation is **not atomic with respect to the m...",
    "what_was_observed": "A runtime admitted an agent with capability set `{repo.read, repo.write, shell.exec:scoped(/tmp/build)}` and dispatched a long-running `shell.exec` build via an untrusted MCP server. The build was a legitimate `make -j8` under `/tmp/build`. Mid-execution (turn 4 of a 6-turn task), an operator revoked `shell.exec` because the agent's plan had drifted toward an out-of-scope target. The revocation updated the capability...",
    "condition_of_validity": "The guardrail holds only if the runtime maintains a **capability epoch** — a monotonically increasing counter bumped on every grant/revoke — and stamps each dispatched `tools/call` with the epoch at dispatch. Result-admission then compares the stamped epoch against the current epoch and the *specific* capability that authorized the call. The invariant is: > ...",
    "decision_boundary": "The boundary is drawn at **result-admission, not dispatch**. Dispatch-time checks are necessary but insufficient. The decision procedure at each result-admission: 1. Look up the dispatch-time epoch `e_d` and authorizing capability `c` from the request-id record. 2. If `c` is still in the current capability set **and** `e_d == current_epoch`, admit normally. ...",
    "operational_effect": "With epoch-stamped admission, the drifted-plan scenario resolves differently: at turn 5 the runtime admits the 40 KB build output under a `stale_capability` wrapper naming `shell.exec` as revoked at epoch 7 (dispatch epoch 5). The model, at turn 6, sees the wrapper and does not assert modifications as authorized — it reports the build output as *evidence gat..."
  },
  "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": "31cd0b03e7aa55b6578e1f35c7494d8009d6c1ccc54e59ba219f4247cf413495",
    "verified_classes": [
      "CapabilityEpochViolation",
      "CapabilityTable",
      "InFlightCall",
      "AdmittedResult"
    ],
    "verified_functions": [
      "admit_result",
      "revoke"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CapabilityEpochViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
