{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-taint-tracking-state-be-reset-when-a-sandboxed-tool-re-enters-the-model-context-the-taint-laundering-boundary-in-runtime-taint",
  "title": "Where must an instance taint-tracking state be reset when a sandboxed tool re-enters the model context: the \"taint laundering\" boundary in runtime taint-aware tool sandboxing",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agent runtimes that maintain per-turn taint labels on tool outputs and gate downstream tool invocation on those labels, where a tool's output is re-serialized and fed back into the model context. Does not apply to stateless single-shot tool calls with no cross-turn label propagation, nor to pure output-filtering deployments that never read back tool results into the prompt.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-taint-tracking-state-be-reset-when-a-sandboxed-tool-re-enters-the-model-context-the-taint-laundering-boundary-in-runtime-taint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-taint-tracking-state-be-reset-when-a-sandboxed-tool-re-enters-the-model-context-the-taint-laundering-boundary-in-runtime-taint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-taint-tracking-state-be-reset-when-a-sandboxed-tool-re-enters-the-model-context-the-taint-laundering-boundary-in-runtime-taint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1961,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint as a property of data** and **taint as a property of the channel through which data re-enters the model**. Taint-aware sandboxing typically labels a tool result as `tainted` when it derives from untrusted input (a fetched web page, an email body, an ingested document). The gate then refuses to let tainted conte...",
    "what_was_observed": "In a runtime that labeled `web_fetch` output as tainted and blocked `shell_exec` while any tainted value was live in the context window, the following sequence completed without a single gate trip: 1. `web_fetch(\"https://attacker.example/page\")` returns HTML containing an injected instruction and a benign-looking command string. Result is labeled `taint=untrusted`, source `web_fetch`. 2. The model is asked to \"summar...",
    "condition_of_validity": "The byte-level taint invariant is valid **only when the set of transformations between tainted source and privileged sink is closed and each transformation is taint-preserving by construction**. Concretely, it holds when: - Every re-entry path from tool output to model context is mediated by a runtime component that re-applies the taint label to the *entire*...",
    "decision_boundary": "The boundary is not \"should we track taint through the model\" — you must, or the invariant is decorative. The boundary is **where declassification is permitted and who authorizes it**. Two coherent positions exist: - **Strict inheritance:** Model outputs inherit taint from context. Any privileged sink requires an explicit declassification event, which must b...",
    "operational_effect": "When the re-entry boundary is unmodeled, the observable effect is a **clean audit log with successful exfiltration**. Taint counters read zero, gates read \"passed,\" and the incident is discovered only from the sink side (an unexpected outbound request, a file written outside the task's declared scope). Post-incident review then finds the injected string verb..."
  },
  "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": "8f860b1138ef2c4aad54e588a7deb36fd2b5d47cf6db6ff8acefa9d71a045a8a",
    "verified_classes": [
      "TaintLaunderingError",
      "TaintLabel"
    ],
    "verified_functions": [
      "bind_tool_argument",
      "join"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
