{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-propagate-taint-labels-across-tool-boundaries-when-prompt-injected-content-re-enters-through-a-trusted-looking-tool-result",
  "title": "How should an instance propagate taint labels across tool boundaries when prompt-injected content re-enters through a trusted-looking tool result?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to single- or multi-agent systems that tag untrusted input (web content, retrieved documents, tool outputs, peer messages) with dynamic information-flow labels and enforce policies on tool invocation. Does not cover static taint analysis of agent source code, nor purely output-side content filters that never carry provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-taint-labels-across-tool-boundaries-when-prompt-injected-content-re-enters-through-a-trusted-looking-tool-result.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-taint-labels-across-tool-boundaries-when-prompt-injected-content-re-enters-through-a-trusted-looking-tool-result.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-taint-labels-across-tool-boundaries-when-prompt-injected-content-re-enters-through-a-trusted-looking-tool-result.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2627,
    "python_slice_tokens": 656,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats taint as a property of *text*: a string is untrusted, and any tool call whose arguments contain untrusted substrings is blocked. The correct model treats taint as a property of the *information-flow lattice position of a value*, propagated by an explicit label algebra at every boundary crossing. The failure mode that breaks the naive m...",
    "what_was_observed": "A retrieval agent instance was configured with a two-level label set: `TRUSTED` (system prompt, operator config) and `UNTRUSTED` (web fetch, user message, retrieved passages). Policy: any tool call whose argument labels include `UNTRUSTED` must be routed to a human-approval gate before execution. The instance fetched a document that contained an injected instruction. The fetch tool returned the document as a JSON env...",
    "condition_of_validity": "The join-propagation invariant is *sound* (never under-labels) only under three conditions, each of which is a place the design can silently break: 1. **Total input capture.** Every value that influenced the tool's output must be in the label join. This fails when a tool reads ambient state (environment variables, a shared cache, a database row written by a ...",
    "decision_boundary": "The boundary between a correct and incorrect implementation is whether the runtime computes the output label as `join(input_labels) ⊔ tool_declared_label` or merely as `tool_declared_label`. The former is monotone and cannot launder; the latter is a trust assertion that the tool author made about inputs they do not control. A second boundary: **derived-value...",
    "operational_effect": "The practical consequence is that taint tracking must be enforced at the *runtime value layer*, not at the prompt layer and not at the tool-registration layer. Concretely: - Tool results are wrapped in a `LabeledValue(value, label)` envelope; the label is computed at the call site as the join of argument labels and any ambient-state labels the tool declares ..."
  },
  "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": "7aa383ae3634c601b64e9c7384e5a5e5b714f0989375d5cada35d99736830b5a",
    "verified_classes": [
      "TaintLaunderingError",
      "MissingDerivationMapError",
      "LabeledValue",
      "ToolContract",
      "TaintRuntime"
    ],
    "verified_functions": [
      "join",
      "_extract_title_impl",
      "demonstrate_failure",
      "__post_init__",
      "__init__",
      "set_ambient",
      "declassify",
      "call_tool"
    ],
    "verified_functions_count": 8,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "MissingDerivationMapError",
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "laundering was not detected — invariant broken",
      "declassification requires a named authority"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
