{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-prompt-injection-taint-must-be-re-derived-at-every-tool-boundary-rather-than-inherited-from-the-retrieval-context",
  "title": "What structural signals indicate prompt-injection taint must be re-derived at every tool boundary rather than inherited from the retrieval context",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents that carry dynamic information-flow (taint) labels across retrieval calls, tool invocations, and model turns to defend against prompt injection. Does not apply to stateless single-shot completions with no tool loop, nor to systems that enforce injection defense purely via output filtering without propagating provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-prompt-injection-taint-must-be-re-derived-at-every-tool-boundary-rather-than-inherited-from-the-retrieval-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-prompt-injection-taint-must-be-re-derived-at-every-tool-boundary-rather-than-inherited-from-the-retrieval-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-prompt-injection-taint-must-be-re-derived-at-every-tool-boundary-rather-than-inherited-from-the-retrieval-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2058,
    "python_slice_tokens": 244,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats a taint label as a *property of a value*: once a retrieved chunk is marked `untrusted`, anything derived from it stays `untrusted` and the label rides along with the data. This is wrong at the model boundary. A label is a property of a **provenance path through a probabilistic transducer**, and the transducer (the LLM turn) is ...",
    "what_was_observed": "A retrieval-augmented agent with a `search_docs` tool and a `send_email` side-effect tool. The harness implemented labels as follows: retrieved chunks got `label=UNTRUSTED`; the model's turn was assumed to inherit the union of labels in its context; `send_email` was guarded to refuse when its arguments were `UNTRUSTED`. Trace that broke it: 1. Turn 1: `search_docs(\"q3 budget\")` returns a chunk containing an injected ...",
    "condition_of_validity": "Inheritance-based taint is only sound when **all** of the following hold, and in practice at least one never does: - **Structural descent is enforced, not inferred.** The model's emitted arguments must be checked against a provenance set the harness can compute, e.g. by requiring arguments to be *references* to labeled handles (`{\"$ref\": \"chunk_17\"}`) rather...",
    "decision_boundary": "The harness must decide, per tool, between two regimes: - **Inheriting tools** (pure, deterministic, declared `trust=inherit`): output label = union of argument labels. Safe *only* if the tool is provably a function of its arguments and emits no model-generated content. `summarize` implemented as an LLM call is **not** inheriting — it is a laundering transfo...",
    "operational_effect": "With inheritance assumed, the observed system exfiltrated on turn 3 and the audit log showed a clean `TRUSTED` argument — a false negative that is invisible in post-hoc review because the laundering happened inside the model, not in the harness. After re-derivation was enforced: - `summarize` was reclassified `trust=launder`; its output forced `UNTRUSTED`, s..."
  },
  "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": "aa83ed774b71b964ebdeb86e60fd9c88bcf97dc274e03309901b39036fe94b73",
    "verified_classes": [
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "resolve_output_label",
      "guard_side_effect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
