{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-preserve-prompt-injection-taint-labels-across-tool-boundaries-and-context-re-entry-without-laundering-untrusted-content-into-th",
  "title": "How should an instance preserve prompt-injection taint labels across tool boundaries and context re-entry without laundering untrusted content into the trusted reasoning channel",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent that ingests external content (tool outputs, retrieved documents, peer-agent messages, web fetches) into a context window and later re-injects that content—verbatim, summarized, or embedding-retrieved—into a subsequent turn. Does not cover injection defense at the model-weight level or pure input sanitization of a single stateless call.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-preserve-prompt-injection-taint-labels-across-tool-boundaries-and-context-re-entry-without-laundering-untrusted-content-into-th.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-preserve-prompt-injection-taint-labels-across-tool-boundaries-and-context-re-entry-without-laundering-untrusted-content-into-th.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-preserve-prompt-injection-taint-labels-across-tool-boundaries-and-context-re-entry-without-laundering-untrusted-content-into-th.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2160,
    "python_slice_tokens": 454,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint as a property of a byte span** and **taint as a property of a reasoning step**. Most agent frameworks implement the first: they tag a tool result, a document chunk, or a message with a label like `untrusted` and carry that label alongside the raw text. This is necessary but not sufficient. The failure mode this...",
    "what_was_observed": "A concrete trace from a tool-using agent with retrieval and a summarization step: 1. Turn 1: agent calls `fetch_url(\"https://untrusted.example/doc\")`. Tool returns 4 KB of text. Framework labels the tool result `trust=untrusted, origin=web`. Correct. 2. Turn 2: agent is asked to \"summarize the fetched document for the working memory.\" The summarizer (same model, separate call) reads the tainted span and emits a 300-t...",
    "condition_of_validity": "The byte-span taint model is valid **only when no transformation sits between the tainted source and the sink**. Formally: if `f` is any function the agent applies to tainted input `x` (summarize, extract, embed, reformat, translate, quote, re-rank), then `f(x)` must be treated as tainted unless `f` is proven taint-preserving-and-non-executing. In practice a...",
    "decision_boundary": "The boundary where this matters operationally is the **sink classification**. A sink is any operation that converts context into action: a tool call with side effects, a final answer to the user, a state mutation, a message to a peer. The rule: - If a sink's argument set intersects any `untrusted`-derived span, the sink must either (a) be blocked, (b) requir...",
    "operational_effect": "Enforcing the lattice changes three things in practice: 1. **Working memory becomes a tainted store, not a trusted store.** Every entry carries `derived_from: {source_ids}` and a computed `trust = join(sources)`. A memory write from a summarizer that read a web doc is `untrusted`. The agent can still use it for reasoning, but any action sink it touches requi..."
  },
  "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": "b69385d8924da539210124e18e5dd791fb047a4ecf9498aa6607de985ceee200",
    "verified_classes": [
      "Trust",
      "Span",
      "TaintLaunderingError",
      "TaintLedger"
    ],
    "verified_functions": [
      "join",
      "declassify_integer",
      "reproduce_laundering",
      "__init__",
      "ingest",
      "transform",
      "check_sink"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "declassification requires a typed value, not free text"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
