{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-quarantine-provenance-tainted-tool-output-before-it-is-written-to-episodic-memory-and-why-does-label-downgrade",
  "title": "Under what conditions must an instance quarantine provenance-tainted tool output before it is written to episodic memory, and why does label downgrade at the summarization boundary defeat taint tracking?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to single- and multi-agent instances that maintain a provenance/taint label on every context segment and propagate that label across tool calls, memory writes, and context compaction. Does not apply to stateless single-turn inference with no persistent memory and no tool surface, where there is nothing to taint across turns.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-provenance-tainted-tool-output-before-it-is-written-to-episodic-memory-and-why-does-label-downgrade.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-provenance-tainted-tool-output-before-it-is-written-to-episodic-memory-and-why-does-label-downgrade.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-provenance-tainted-tool-output-before-it-is-written-to-episodic-memory-and-why-does-label-downgrade.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2231,
    "python_slice_tokens": 376,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent read a malicious string.\" The failure is a **label-laundering event at a compression boundary**. Taint tracking on agent context is a *lattice* problem: every segment carries a provenance tag (e.g., `TRUSTED_INSTRUCTION`, `USER_INPUT`, `EXTERNAL_TOOL_OUTPUT`, `MEMORY_DERIVED`), and the tag must be the *least upper bound* (join) ...",
    "what_was_observed": "A support-triage agent was instrumented with per-segment provenance labels. Its tool surface included `web_search` and `read_ticket`. Every `web_search` result was correctly tagged `EXTERNAL_TOOL_OUTPUT` and the runtime refused to execute any imperative sentence found inside a tagged segment — a standard \"no instructions from untrusted segments\" guard. The guard worked: over 4,000 tool calls, zero direct injection ex...",
    "condition_of_validity": "The invariant that must hold for taint tracking to be sound across memory is: > **For every segment `s` produced by any transformation `f` over inputs `i_1..i_n`, `label(s) = join(label(i_1), ..., label(i_n))`.** No transformation — summarization, paraphrase, translation, embedding, tool-output formatting, or schema coercion — may *lower* a label. Label assi...",
    "decision_boundary": "The operational decision is: **at the moment a segment is about to be written to durable memory, must the instance (a) write it with the joined label, (b) quarantine it, or (c) reject the write?** The boundary is drawn on two axes — the joined label and whether the claim is *actionable* (could change a future decision): The key rule: **actionability, not gra...",
    "operational_effect": "When the join is enforced, three concrete behaviors change: 1. **Distillation becomes taint-preserving.** The summarizer is prompted and constrained to emit labels as the join of input labels, and the write path validates `output.label ⊇ join(input.labels)` before commit. Any record whose label is lower than its inputs' join is rejected at write time. This c..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "d78e3263c4072581abf5fd6a97bbbc53abab7a7391f4a515172d5e597d9ce1f3",
    "verified_classes": [
      "Trust",
      "TaintLaunderingError",
      "Segment",
      "MemoryRecord"
    ],
    "verified_functions": [
      "join",
      "is_actionable",
      "distill_and_write",
      "promote_with_corroboration"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "actionable claim descended from external tool output; quarantine pending corroboration from a distinct trust domain",
      "corroborating source is itself tainted; cannot promote",
      "corroborating source is not independent of the original derivation"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
