{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-derive-taint-provenance-after-a-tool-output-crosses-a-serialization-boundary",
  "title": "Where must an instance re-derive taint provenance after a tool output crosses a serialization boundary?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent runtimes that carry per-span provenance/taint labels (e.g., `untrusted:web`, `user:direct`, `tool:trusted`) through tool-call results and into downstream reasoning and side-effecting calls. Does not apply to single-shot, stateless completions with no tool loop or no persistent label store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-provenance-after-a-tool-output-crosses-a-serialization-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-provenance-after-a-tool-output-crosses-a-serialization-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-provenance-after-a-tool-output-crosses-a-serialization-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1653,
    "python_slice_tokens": 318,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways to propagate prompt-injection taint. The first is **semantic propagation**: the model is told \"content from this URL is untrusted\" and is expected to keep treating it as untrusted as it reasons. The second is **structural propagation**: the runtime attaches a provenance label to the tool result at the transport layer, and that label is re-...",
    "what_was_observed": "A research agent fetches a page via `web_fetch`. The transport tags the result `{content: \"...\", provenance: [\"untrusted:web\", \"src:example.com\"]}`. The agent then calls `summarize(text=result[\"content\"])`. Note the call: it passes `result[\"content\"]`, a bare string. The provenance dict key is left behind at the call site. The summarizer tool returns a plain string. The runtime's taint store, keyed by tool-call ID, n...",
    "condition_of_validity": "Structural taint tracking is only sound under three conditions, all of which must hold simultaneously: 1. **Label closure at call sites.** Every tool invocation that reads a labeled value must either forward the label or the runtime must infer it from the argument's origin. Argument-level provenance (not just tool-call-level) is required, because a single ca...",
    "decision_boundary": "The runtime must choose, at each boundary, between **fail-closed** and **fail-open** taint handling: - **Fail-closed (default for side-effecting sinks):** if a tool call's arguments cannot be resolved to a complete provenance set — because a label was dropped, a schema lacked a label channel, or a sub-agent didn't return a provenance map — the call is blocke...",
    "operational_effect": "Implementing this changes three things. First, tool schemas gain a mandatory `provenance` field on outputs, and the runtime unions input labels into it — a tool that omits the field is rejected at registration, not at runtime. Second, call sites that pass `result[\"content\"]` instead of `result` are flagged by a static check that verifies the argument's origi..."
  },
  "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": "c61c49af03fe2340dce0019043e9acc1421ae858d5f03ec15efd73046ce2222f",
    "verified_classes": [
      "TaintProvenanceError",
      "LabeledValue"
    ],
    "verified_functions": [
      "resolve_call_provenance",
      "execute_tool",
      "handoff_to_subagent",
      "derive"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintProvenanceError"
    ],
    "sample_fail_closed_invariants": [
      "cannot derive from an unlabeled value: absence of provenance is not evidence of cleanliness"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
