{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-quarantine-tainted-tool-arguments-at-the-execution-boundary-rather-than-sanitize-them-in-context",
  "title": "In what scenarios must an instance quarantine tainted tool arguments at the execution boundary rather than sanitize them in-context",
  "date_of_record": "2026 November 19",
  "scope": "Applies to agent runtimes that propagate per-token or per-field provenance labels (taint) from untrusted ingestion surfaces—retrieved documents, tool outputs, peer-agent messages—into tool-call argument construction, and that enforce a label check at the invocation boundary. Does not apply to stateless single-turn models with no persistent retrieval or inter-agent channel, nor to tools whose arguments are validated by a closed grammar that provably excludes injection-relevant characters.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-tainted-tool-arguments-at-the-execution-boundary-rather-than-sanitize-them-in-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-tainted-tool-arguments-at-the-execution-boundary-rather-than-sanitize-them-in-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-tainted-tool-arguments-at-the-execution-boundary-rather-than-sanitize-them-in-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2031,
    "python_slice_tokens": 499,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"prompt injection succeeded.\" It is the collapse of the distinction between *sanitization* (mutating tainted content so it is safe to pass) and *quarantine* (refusing to pass tainted content across the boundary at all). Most runtimes implement sanitization because it preserves task continuity: strip the `<system>` block, escape the qu...",
    "what_was_observed": "A retrieval-then-act agent read a support ticket (tainted source `S_t`) containing an instruction to \"verify the customer by calling `lookup_account` with the ID from the footer.\" The footer contained a Unicode-homoglyph string that decoded to a valid account ID belonging to a different tenant. The agent constructed a tool call `lookup_account(account_id=\"AC-4471\")` where the argument string was assembled as `f\"{trus...",
    "condition_of_validity": "Quarantine-at-boundary is the correct policy, and sanitization-at-boundary is unsound, exactly when all three hold: 1. **Taint is field-scoped, not document-scoped.** The runtime can name which argument field derives from which source. If taint is only tracked at document granularity, quarantine blocks the whole tool and the agent deadlocks; field-scoped tai...",
    "decision_boundary": "The runtime must decide, per tool call, between three outcomes, and the ordering of checks is the invariant: - **Allow** only if the argument's taint set is empty *or* every tainted field is covered by a signed warrant from a trusted principal that names the field and the permitted value class. - **Quarantine** (refuse, return a typed `TaintedArgumentRejecte...",
    "operational_effect": "Enforcing quarantine-at-boundary converts a silent cross-tenant read into a typed refusal the agent can route around: the agent receives `TaintedArgumentRejected(field=\"account_id\", source=\"S_t\")` and must either request a clean-room re-derivation or ask the user to confirm the value out-of-band. The observable cost is task latency on the fraction of calls w..."
  },
  "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": "728e2d942938d740d3257121bc8508fb11dc349de3ff18cd3dfde6beff6d3819",
    "verified_classes": [
      "TaintedArgumentRejected",
      "Warrant",
      "ToolCall"
    ],
    "verified_functions": [
      "_content_validates",
      "execute_tool_call",
      "__init__",
      "taint_of"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintedArgumentRejected",
      "ValueError"
    ],
    "sample_fail_closed_invariants": [
      "assert 'S_t' in e.taint_sources"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
