{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-taint-provenance-at-the-tool-result-re-entry-boundary-during-skill-injection-containment",
  "title": "Why does an instance lose taint provenance at the tool-result re-entry boundary during skill-injection containment",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agent runtimes that maintain a per-value taint label (source-of-data provenance) and propagate it across tool calls to block lateral movement from injected skills. Does not apply to stateless single-shot completions or to runtimes that re-derive taint from scratch on every hop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-at-the-tool-result-re-entry-boundary-during-skill-injection-containment.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-at-the-tool-result-re-entry-boundary-during-skill-injection-containment.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-at-the-tool-result-re-entry-boundary-during-skill-injection-containment.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1888,
    "python_slice_tokens": 450,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two places an agent runtime can enforce taint: at the *call boundary* (what arguments leave the agent) and at the *re-entry boundary* (what results come back and how they are labeled for the next hop). Most containment designs instrument the call boundary — they tag inputs to a tool and refuse to pass tainted data into a sensitive sink. The non-obv...",
    "what_was_observed": "A three-hop chain: (1) an external document is fetched, tagged `EXTERNAL`, and summarized by a `fetch_and_summarize` skill whose declared output class is `SUMMARY`; (2) the summary is written into a notes store by a `write_note` skill; (3) a separate, higher-privilege `send_email` skill reads the note and dispatches it. The runtime correctly blocked direct `EXTERNAL → send_email`. It did not block the chain, because ...",
    "condition_of_validity": "The containment guard is only valid under the following condition: **for every tool invocation, `label(result) ⊒ join(label(arg_i) for all consumed args)`, where `⊒` is the taint lattice order and the join is computed over *actual* data dependencies, not declared ones.** This must hold at re-entry, after the tool returns, and the computed label must be *join...",
    "decision_boundary": "The runtime must decide, per re-entry, whether to (i) accept the result with `join(actual_inputs) ⊔ declared_class`, (ii) quarantine the result if the join exceeds the sink's clearance, or (iii) reject the call as a taint-laundering site if the tool's declared dependency set does not cover the store it touched. The boundary between (i) and (iii) is: **if a t...",
    "operational_effect": "With the invariant enforced, the observed chain is blocked at hop 2: `write_note` joins `SUMMARY ⊔ EXTERNAL = EXTERNAL` into the note cell, and `read_note` joins `EXTERNAL` out, so `send_email` receives an `EXTERNAL`-tainted argument and the sink refuses. The cost is over-tainting: a note that legitimately mixed external and internal content becomes fully `E..."
  },
  "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": "171780524cd3d7057612f970abf5e856e03963d7ca006782486806fc367155c9",
    "verified_classes": [
      "TaintLaunderingError",
      "TaintedValue",
      "TaintStore"
    ],
    "verified_functions": [
      "join",
      "enforce_reentry",
      "run_chain",
      "write",
      "read"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "taint decayed across notes store; containment failed"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
