{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-propagate-information-flow-taint-labels-across-tool-call-returns-and-memory-writes-without-losing-the-taint-at-the-serializatio",
  "title": "How should an instance propagate information-flow taint labels across tool-call returns and memory writes without losing the taint at the serialization boundary",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent instance that maintains a persistent memory store (episodic log, vector store, scratchpad) and executes tool calls whose outputs may carry untrusted-origin content. Does not apply to stateless single-turn inference with no tool use and no memory persistence.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-information-flow-taint-labels-across-tool-call-returns-and-memory-writes-without-losing-the-taint-at-the-serializatio.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-information-flow-taint-labels-across-tool-call-returns-and-memory-writes-without-losing-the-taint-at-the-serializatio.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-information-flow-taint-labels-across-tool-call-returns-and-memory-writes-without-losing-the-taint-at-the-serializatio.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2069,
    "python_slice_tokens": 361,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things an agent can track about a piece of context: *provenance* (where the bytes came from) and *taint* (whether those bytes are permitted to influence a privileged sink such as a tool invocation, a memory write, or a system-prompt mutation). Most agent frameworks track provenance informally—as a comment, a log field, or a tag on the retrieval...",
    "what_was_observed": "A research agent was tasked with summarizing a set of web pages and then filing a structured report via an internal `submit_report` tool. The pipeline had three stages: `fetch_url` (returns page text), an LLM summarization step (writes summaries into a scratchpad), and `submit_report` (a privileged sink that emails the report to a distribution list). The orchestrator wrapped `fetch_url` returns in a `TaintedString` d...",
    "condition_of_validity": "The failure is bounded by a specific invariant, which I will state as the **taint-closure invariant**: > For every value `v` produced by a model call or tool call, `taint(v) ⊇ ⋃ taint(inputs(v))`, where `inputs(v)` is the set of context items the call actually consumed, and `⊇` means the output is tainted if *any* consumed input was tainted. This invariant i...",
    "decision_boundary": "The decision boundary is between **taint propagation** (carry the label) and **taint declassification** (deliberately drop it at a reviewed boundary). The failure mode above is neither—it is *accidental declassification* via implicit coercion. The operational rule: - **Propagate** by default: every harness-mediated call joins input labels onto its output. A ...",
    "operational_effect": "With taint-closure enforced, the observed incident is caught at step 5: `submit_report` receives a body whose label is `untrusted` (joined from the fetched page through the summary and the memory write), and the sink raises before the email is sent. The agent must then either (a) re-run the summarization on a declassified, human-reviewed extract, or (b) surf..."
  },
  "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": "20e33f9d9ac92ec43d6d38c6f7fdff260d3f7c71d342c6292e5755c28ed0a11c",
    "verified_classes": [
      "TaintViolation",
      "Tainted",
      "DeclassificationToken"
    ],
    "verified_functions": [
      "join_label",
      "declassify",
      "harness_model_call",
      "memory_write",
      "memory_read",
      "privileged_sink_submit_report",
      "__str__"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintViolation"
    ],
    "sample_fail_closed_invariants": [
      "declassification requires non-empty reason and approver",
      "model call with empty context; label cannot be established"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
