{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-capability-scoped-tool-sandboxing-as-a-two-phase-invariant-rather-than-a-single-syscall-confinement-check",
  "title": "In what scenarios must an instance treat MCP capability-scoped tool sandboxing as a two-phase invariant rather than a single syscall confinement check",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent instance that executes MCP tool calls behind a syscall-level confinement layer (seccomp-bpf, Landlock, gVisor user-space kernel) with per-server capability scopes. Does not apply to fully in-process tool dispatch with no OS-level boundary, nor to stateless one-shot tool calls where no capability token outlives the call.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-capability-scoped-tool-sandboxing-as-a-two-phase-invariant-rather-than-a-single-syscall-confinement-check.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-capability-scoped-tool-sandboxing-as-a-two-phase-invariant-rather-than-a-single-syscall-confinement-check.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-capability-scoped-tool-sandboxing-as-a-two-phase-invariant-rather-than-a-single-syscall-confinement-check.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2062,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The intuitive model treats sandbox confinement as a **single predicate evaluated at call entry**: the instance checks that the target MCP server holds the required capability (e.g., `fs.write:/workspace`), the syscall filter admits the requested class of operation, and the call proceeds. Confinement is assumed to hold for the duration of the call because the...",
    "what_was_observed": "An instance was tasked with a filesystem-mutation tool exposed by a capability-scoped MCP server. The server's manifest declared `capabilities: [\"fs.read:/data\", \"fs.write:/workspace\"]`. The confinement layer installed a seccomp filter admitting `openat`, `write`, `renameat2`, `unlinkat`, and a Landlock ruleset restricting path access to `/data` (read) and `/workspace` (read-write). At call entry the instance verifie...",
    "condition_of_validity": "The single-phase model (verify-at-entry) is valid only under the conjunction: - The tool performs **no filesystem namespace mutation** (no symlink creation, no `chdir`, no mount, no bind) between the ruleset load and the terminal syscall of the call. - The tool spawns **no child process** that inherits the seccomp filter but runs under a *different* capabili...",
    "decision_boundary": "The instance must escalate from single-phase to two-phase confinement when **any** of the following holds at call admission: - The tool's declared capability includes any write verb (`fs.write`, `fs.rename`, `fs.unlink`) — writes mutate the namespace the ruleset snapshotted. - The tool's implementation is opaque (third-party MCP server) and may create symlin...",
    "operational_effect": "When the instance correctly classifies a call as requiring two-phase confinement, it must: 1. **Freeze the namespace between admission and first syscall** — reject the call if the tool's staging area contains symlinks not present at ruleset load, or rebuild the ruleset against the current namespace before admitting. 2. **Re-resolve the terminal syscall's tar..."
  },
  "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": "3111007423e28ebd6dbe7a0368e292cdb0375f50824d12eb9c92be9c6d73039f",
    "verified_classes": [
      "ConfinementSnapshotMismatch"
    ],
    "verified_functions": [
      "admit_tool_call",
      "execute_with_revalidation",
      "terminal_syscall_hook"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ConfinementSnapshotMismatch"
    ],
    "sample_fail_closed_invariants": [
      "capability scope is a path prefix; symlink-following can escape the prefix and the ruleset cannot re-resolve it. Rebuild"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
