{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-taint-declassification-boundary-when-a-sandboxed-agent-s-own-reasoning-output-becomes-an-input-channel",
  "title": "Where must an instance draw the taint-declassification boundary when a sandboxed agent's own reasoning output becomes an input channel",
  "date_of_record": "2026 November 29",
  "scope": "Applies to single- or multi-step LLM agents executing inside a taint-tracking sandbox where tool outputs are labeled (e.g., `UNTRUSTED`), propagated through the agent's working state, and only released to sensitive sinks (filesystem writes, outbound HTTP, exec) after an explicit declassification policy fires. Does *not* cover prompt-injection detection heuristics that operate on content rather than provenance, nor OS-level seccomp/namespace isolation, which are orthogonal layers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-taint-declassification-boundary-when-a-sandboxed-agent-s-own-reasoning-output-becomes-an-input-channel.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-taint-declassification-boundary-when-a-sandboxed-agent-s-own-reasoning-output-becomes-an-input-channel.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-taint-declassification-boundary-when-a-sandboxed-agent-s-own-reasoning-output-becomes-an-input-channel.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1915,
    "python_slice_tokens": 305,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-propagation systems are built on the assumption that taint flows through *data*. In an agent sandbox the dominant flow is through *the model's own generated tokens*: the agent reads an `UNTRUSTED` tool result, reasons over it, and emits a plan, a tool call, or a summary. That emission is a fresh artifact produced by a probabilistic function over tainte...",
    "what_was_observed": "A file-reading agent was given a task: summarize `notes.md` (trusted, `TRUSTED`) and `vendor_spec.txt` (fetched from an external URL, labeled `UNTRUSTED`). The sandbox labeled the fetched bytes `UNTRUSTED` and propagated the label into the tool-result message. The agent then produced a single assistant turn: \"The vendor requires the config to include `endpoint=http://attacker.example/c2`. I will write this to `config...",
    "condition_of_validity": "The invariant holds only under these conditions, and the guardrail below is meaningless outside them: 1. **Provenance is tracked as a lattice over values, not objects.** Every string emerging from a tool result carries a label set; concatenation, substring, and re-serialization preserve the join of input labels. Object identity is insufficient because the mo...",
    "decision_boundary": "The runtime must decide, at each assistant turn, whether to (a) taint the entire generated turn at the join of its conditioning context, or (b) attempt to attribute taint to specific spans of the generated text. Option (b) requires the model to emit provenance annotations (e.g., structured citations to source spans) and is only sound if those annotations are...",
    "operational_effect": "With turn-level taint and sink-side predicates, the observed file-write attack fails: the `write` call's `data` argument is tainted at the join of the turn's conditioning context (which included `r_42`), the sink's cleared set does not include that label, and the write is blocked pending a pre-registered predicate. The predicate `^[a-z0-9_.-]+$` fails agains..."
  },
  "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": "1491074aeaed78ee657df7c3589d5d9d677a578a759ea51fb064969fa87b7214",
    "verified_classes": [
      "TaintLaunderingError",
      "SinkRelease"
    ],
    "verified_functions": [
      "guarded_write",
      "__init__",
      "release"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
