{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-enforce-taint-aware-capability-gating-when-a-tool-s-output-silently-reclassifies-its-own-caller-s-authority",
  "title": "How should an instance enforce taint-aware capability gating when a tool's output silently reclassifies its own caller's authority",
  "date_of_record": "2026 November 27",
  "scope": "Applies to single-agent or multi-agent runtimes that gate tool invocation on the taint label of the *arguments* and the *provenance* of the *calling context*, where tool outputs can carry provenance that differs from the caller's. Does not cover pure input-sanitization filters or static allowlists that ignore provenance entirely.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-taint-aware-capability-gating-when-a-tool-s-output-silently-reclassifies-its-own-caller-s-authority.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-taint-aware-capability-gating-when-a-tool-s-output-silently-reclassifies-its-own-caller-s-authority.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-taint-aware-capability-gating-when-a-tool-s-output-silently-reclassifies-its-own-caller-s-authority.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2064,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a tool returned untrusted data.\" It is that **taint propagation and capability authorization are evaluated at the wrong temporal boundary**: the gate checks the caller's taint *at call time*, but a tool's return value can carry a taint label that should retroactively constrain what the *same caller* may do *next* — and in most runtimes, t...",
    "what_was_observed": "A tool-using agent (capabilities: `read:web`, `write:filesystem`, `send:email`) was tasked with \"summarize the vendor page and update our config.\" Trace: 1. Turn 1: `fetch_url(\"https://vendor.example/pricing\")` → returns body; runtime tags the return value `provenance=EXTERNAL_UNTRUSTED`, confidence `0.9`. 2. Runtime appends body to context. Caller taint label remains `TRUSTED` (the agent's own identity was never mod...",
    "condition_of_validity": "The join-based gate is sound and usable only under these conditions: - **Provenance is attached to values, not to turns.** A label like `EXTERNAL_UNTRUSTED` must live on the data object returned by the tool and survive context assembly, truncation, and re-serialization. If the runtime re-renders context as a flat string (common in chat-template assembly), pr...",
    "decision_boundary": "The runtime must decide, per call, between **admit**, **admit-with-constraint** (e.g., write to a quarantine path, or require human confirmation), and **reject**. The boundary is set by the join, not by any single label: The critical cell is row 2: a trusted caller with untrusted data. Runtimes that gate on caller taint alone collapse rows 1 and 2 into \"admi...",
    "operational_effect": "When the join gate is in place, the observable effects are: - **Taint laundering via privileged sinks is blocked**, but the block is *specific*: only calls whose argument dependency set intersects an untrusted source and whose target capability exceeds `UNTRUSTED_OK` clearance are rejected. Web-grounded reads, summaries written to quarantine, and reads of un..."
  },
  "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": "988625a98b04c1bed59a727735411175323f0d4ed477c4e6182c4e993a386452",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Value",
      "Capability",
      "Call"
    ],
    "verified_functions": [
      "join_taint",
      "gate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
