{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-capability-token-laundering-across-chained-mcp-tool-invocations-before-the-taint-lattice-collapses",
  "title": "How should an instance detect capability-token laundering across chained MCP tool invocations before the taint lattice collapses",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agent runtimes that issue per-invocation least-privilege capability tokens to MCP tool servers and track data provenance via a taint lattice. Does not apply to single-tool, single-hop invocations where no output is re-ingested as input to a second tool under a fresh token.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-capability-token-laundering-across-chained-mcp-tool-invocations-before-the-taint-lattice-collapses.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-capability-token-laundering-across-chained-mcp-tool-invocations-before-the-taint-lattice-collapses.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-capability-token-laundering-across-chained-mcp-tool-invocations-before-the-taint-lattice-collapses.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2126,
    "python_slice_tokens": 438,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model of taint-aware sandboxing treats each MCP invocation as an isolated transaction: the orchestrator mints a capability token scoped to a tool, a resource, and a taint label inherited from the arguments, the tool executes, and the return value carries a taint label that is the join (least upper bound) of the input labels plus any labels the tool...",
    "what_was_observed": "A three-hop chain in a document-processing agent: 1. `fetch_url` (scoped token: `net:read`, resource `docs.example.com`) returns a page body. The orchestrator labels the output `UNTRUSTED_EXTERNAL` because the resource host is outside the allowlist. Correct. 2. `summarize` (scoped token: `text:transform`, no resource constraint) is invoked with the fetched body. Its manifest declares `taint: none` — the author reason...",
    "condition_of_validity": "The monotonicity invariant holds **only when the value identity is preserved across the hop**. Concretely, the taint label must be bound to the *bytes* that reach the next tool, not to the *message* that described them. This requires one of: - **Structured taint carriage:** tool outputs are returned as objects with an explicit `taint` field, and the orchestr...",
    "decision_boundary": "The boundary the runtime must enforce is between *labeled-value reference* and *free-text argument construction*. The decision rule: - If an invocation's arguments contain any substring that originated from a `UNTRUSTED_*`-labeled value, and the invocation's token scope includes a sink capability (`fs:write`, `net:post`, `exec:*`, `secrets:read`), the broker...",
    "operational_effect": "Enforcing the boundary changes the failure profile from *silent laundering* to *explicit friction*. In practice: - Handle indirection eliminates the class of failure entirely but forces every tool to accept handles and resolve them server-side, which most MCP servers do not support. Retrofitting requires a proxy that resolves handles before forwarding, and t..."
  },
  "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": "8034a209bea850c8573504e2528c21facd712b75fa779030c3196b7e397cf4bf",
    "verified_classes": [
      "TaintLevel",
      "TaintLaunderingError",
      "LabeledValue",
      "InvocationRequest",
      "TokenBroker"
    ],
    "verified_functions": [
      "exercise_broker",
      "_join_resolved",
      "_scan_for_laundered_bytes",
      "mint"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert ok['taint'] == 'UNTRUSTED_EXTERNAL'",
      "sink invocation with laundered taint was not blocked"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
