{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-derive-taint-provenance-after-a-tool-call-returns-unlabeled-content-and-why-label-propagation-silently-fails-at-the-tool-bou",
  "title": "Where must an instance re-derive taint provenance after a tool call returns unlabeled content, and why label propagation silently fails at the tool boundary",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent that carries provenance/taint labels on context segments (user turns, tool outputs, retrieved documents) to defend against prompt injection, where tool calls return content that is re-inserted into context. Does not cover stateless single-turn classification or systems with no cross-turn taint model.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-provenance-after-a-tool-call-returns-unlabeled-content-and-why-label-propagation-silently-fails-at-the-tool-bou.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-provenance-after-a-tool-call-returns-unlabeled-content-and-why-label-propagation-silently-fails-at-the-tool-bou.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-provenance-after-a-tool-call-returns-unlabeled-content-and-why-label-propagation-silently-fails-at-the-tool-bou.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1993,
    "python_slice_tokens": 330,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-tracking system conflates two different operations: **label transport** (carrying a provenance label along with a byte range as it moves through context) and **label re-derivation** (recomputing the correct label from the actual origin of a piece of content at the moment it re-enters context). Label transport is cheap and works within a single truste...",
    "what_was_observed": "Trigger condition: an agent with a per-segment taint model (e.g., `UNTRUSTED` for web-fetch results, `TRUSTED` for system prompt and operator turns) issues a tool call whose raw response is a JSON envelope, then extracts a sub-field from that envelope and inserts *only the sub-field* into the next context window. Trace: 1. Turn N: agent calls `fetch_url`. The orchestrator wraps the call so the response is tagged `UNT...",
    "condition_of_validity": "The transport-as-re-derivation shortcut is valid **only** when the following invariant holds: every byte that enters context after a tool call is either (a) a verbatim, byte-identical copy of a labeled segment, with the label preserved by construction, or (b) produced by trusted code from inputs that were themselves correctly labeled, and the taint algebra p...",
    "decision_boundary": "The boundary is this: **transport labels across the tool boundary only for verbatim passthrough; re-derive labels for everything else, and treat \"everything else\" as the default case.** Concretely, at the moment any string is about to be inserted into context as a new segment, the orchestrator must answer one question: *is this string byte-identical to a sub...",
    "operational_effect": "When the boundary is respected, injection payloads that survive a tool call still carry `UNTRUSTED` through summarization, filtering, error handling, and re-serialization, and the downstream policy check fires correctly. The cost is that trusted-code outputs derived from untrusted inputs are now labeled untrusted, which means legitimate summaries of web cont..."
  },
  "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": "98ddb080d178cef26e3cd6dfd2b6597845d5ca60e16173a6ebe6f14fabb3c59e",
    "verified_classes": [
      "TaintLaunderingError",
      "Segment",
      "Context"
    ],
    "verified_functions": [
      "run_tool_roundtrip",
      "add_labeled",
      "join_label",
      "insert_derived"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "summarizer output of untrusted content was tagged TRUSTED; taint boundary crossed at tool return"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
