{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-laundering-through-attenuated-tool-graphs-in-agent-sandboxes",
  "title": "Which invariants prevent taint laundering through attenuated tool graphs in agent sandboxes",
  "date_of_record": "2026 November 16",
  "scope": "Applies to multi-turn agent runtimes where tool calls are mediated by a capability-attenuating sandbox and where data provenance is tracked via taint labels that propagate across skill boundaries. Does not apply to single-shot inference, stateless RPC gateways, or systems where all tool inputs are statically known at admission time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-attenuated-tool-graphs-in-agent-sandboxes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-attenuated-tool-graphs-in-agent-sandboxes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-attenuated-tool-graphs-in-agent-sandboxes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1541,
    "python_slice_tokens": 282,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats taint as a property of *values* and capability attenuation as a property of *handles*. The failure mode emerges because these two lattices are not aligned: a capability can be attenuated (reduced rights) while the taint label attached to the data flowing through it is *widened* by the receiving skill. Attenuation is monotone-de...",
    "what_was_observed": "A skill `summarize_ticket` was admitted with capabilities `{read:ticket, write:scratch}` and no network egress. A second skill `format_report` held `{read:scratch, write:report}`. The runtime's taint policy declared `write:scratch` as *declassifying* on the assumption that scratch storage was ephemeral and skill-local. In practice, scratch was a shared KV namespace keyed by session, so `format_report` read values tai...",
    "condition_of_validity": "The invariant holds — i.e., the system is safe — only when all three of the following are enforced simultaneously: 1. **Closure-taint at sinks.** Every sink capability carries a required taint level computed as the join over the transitive read-closure of the calling skill, including shared-state reads, not just call arguments. 2. **No declassification by at...",
    "decision_boundary": "The operational decision is whether to treat shared scratch/storage as a **taint-transmitting channel** (conservative, correct, higher false-positive rate on benign cross-skill handoffs) or as a **taint-neutral buffer** (fast, unsound). The boundary condition is the presence of any read capability on shared state by a skill whose write-sink taint requirement...",
    "operational_effect": "Enforcing closure-taint and retry-provenance preservation raises the admission-time cost of skill graphs from O(skills) to O(skills × shared-resources) for the static check, and adds a per-call closure computation that is memoizable per (skill, capability-set) pair. In the observed deployment this increased p99 tool-call latency by 4–7% and rejected 11% of p..."
  },
  "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": "3c86045db7da14a6fafe56aa94c2765259f4a7311fc5642ebf05af7f35f94316",
    "verified_classes": [
      "TaintLaunderingError",
      "Capability",
      "Skill"
    ],
    "verified_functions": [
      "join_taint",
      "check_closure_taint",
      "check_retry_provenance"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
