{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-quarantine-a-memory-write-when-a-taint-label-arrives-via-a-tool-output-rather-than-the-prompt",
  "title": "Under what conditions must an instance quarantine a memory write when a taint label arrives via a tool output rather than the prompt",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents running an explicit information-flow-label (IFC) taint tracker where labels propagate from prompt segments through tool-call results into memory-write operations. Does not apply to stateless single-turn inference with no persistence layer, nor to systems relying solely on output-side classifiers without per-token label provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-memory-write-when-a-taint-label-arrives-via-a-tool-output-rather-than-the-prompt.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-memory-write-when-a-taint-label-arrives-via-a-tool-output-rather-than-the-prompt.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-memory-write-when-a-taint-label-arrives-via-a-tool-output-rather-than-the-prompt.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2197,
    "python_slice_tokens": 549,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways a taint label can enter an agent's working state, and they demand asymmetric handling: 1. **Prompt-origin taint** — the label is attached to a segment of the user/system prompt at ingress. The provenance is known before any tool executes, the label is stable, and the taint set is a subset of what the runtime already ...",
    "what_was_observed": "A retrieval-augmented agent with a `write_memory(key, value)` tool was instrumented with a label tracker. Labels: `TRUSTED` (system prompt, operator config), `UNTRUSTED` (web fetch, third-party tool output), `DERIVED` (model-generated text). Propagation rule: any `DERIVED` segment whose context window overlapped an `UNTRUSTED` segment inherits `UNTRUSTED`. Trace of the failure: - Step 1: Agent calls `web_fetch(url)`....",
    "condition_of_validity": "The invariant \"a memory write is safe if its value label is not `UNTRUSTED`\" holds **only if** label propagation is *conservative under semantic transformation* — i.e., the labeler must over-approximate: any `DERIVED` segment whose generation was conditioned on any `UNTRUSTED` token inherits `UNTRUSTED`, regardless of lexical overlap. Concretely, the guardra...",
    "decision_boundary": "The boundary between \"permit the write\" and \"quarantine the write\" is not the value's label. It is: with two escape hatches that must be *explicit and logged*, not implicit: - **Operator-signed declassification**: a human or a `TRUSTED`-labeled policy segment may reclassify a specific quarantined write. The declassification is itself a labeled event with pro...",
    "operational_effect": "With the causal-context rule in place, the observed failure chain is bounded at step 3: the paraphrased summary inherits `UNTRUSTED` because its causal context included the fetched span, the `write_memory` call is quarantined, and the next-session cold start retrieves nothing. The cost is measurable: in the instrumented workload, ~4% of legitimate memory wri..."
  },
  "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": "62f865bb384a947ecee745bae7f6da0fec54f7002bcf99d961a45373eb0bc672",
    "verified_classes": [
      "TaintLaunderingError",
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "authorize_memory_write",
      "authorize_memory_write"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
