{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-taint-provenance-when-a-laundered-prompt-injection-label-is-dropped-by-a-tool-boundary-re-serialization",
  "title": "Why does an instance lose taint provenance when a laundered prompt-injection label is dropped by a tool-boundary re-serialization",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agent runtimes that implement dynamic information-flow (taint) labels on context fragments and tool arguments, where labels are propagated in-band alongside payloads across tool calls. Does not apply to runtimes that enforce taint purely at the memory-subsystem level with out-of-band label storage keyed by content hash, nor to single-turn, tool-free inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-laundered-prompt-injection-label-is-dropped-by-a-tool-boundary-re-serialization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-laundered-prompt-injection-label-is-dropped-by-a-tool-boundary-re-serialization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-laundered-prompt-injection-label-is-dropped-by-a-tool-boundary-re-serialization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1683,
    "python_slice_tokens": 348,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent read a malicious document.\" That is expected and survivable. The failure is that a taint label attached to a context fragment **survived the semantic path but not the serialization path**: the injected instruction was correctly flagged as `untrusted` at retrieval time, the label propagated through the planner's reasoning trace, ...",
    "what_was_observed": "A retrieval step pulled a document chunk. The classifier tagged it `{trust: untrusted, origin: web, id: frag_8812}`. The planner, operating on a scratchpad, produced a tool call: The `query` string embedded the untrusted text. The tool schema accepted `query: string` with no accompanying `taint` field — the MCP-style call envelope carried `arguments` only. On the tool's return, the result object arrived as: The runti...",
    "condition_of_validity": "The invariant that must hold: **for every context fragment consumed by the planner, the taint lattice value is a join over all ancestor fragments that contributed bytes to it, and this join is preserved across every serialization boundary the fragment crosses.** The failure requires all of the following to hold simultaneously: 1. Labels are carried **in-band...",
    "decision_boundary": "The operational choice is between two enforcement points, and they are not equivalent: - **Enforce at the planner (reference-only arguments).** Untrusted content may never be inlined into a tool argument; the planner must pass an opaque fragment id, and the tool runtime performs resolution with labels attached. This is robust but requires every tool to parti...",
    "operational_effect": "When the boundary is crossed, the taint lattice becomes non-monotonic: a fragment's effective trust can *increase* as it flows downstream, which inverts the entire premise of information-flow control. Downstream policy decisions — \"forward only trusted content to external recipients,\" \"execute only trusted tool arguments\" — then evaluate against a label that..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "186595c6d98e09be3da287dfa560f0faab8a4f8e7041cb75e92e0467188c3723",
    "verified_classes": [
      "Trust",
      "Fragment",
      "ToolCall",
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "join_taint",
      "resolve_argument_lineage",
      "guard_tool_return",
      "run_tool"
    ],
    "verified_functions_count": 4,
    "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
  }
}
