{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-taint-cleared-argument-has-been-re-derived-from-untrusted-memory-rather-than-user-input",
  "title": "How does an instance detect that a taint-cleared argument has been re-derived from untrusted memory rather than user input?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to single-instance agents that perform tool authorization gating via information-flow taint tracking across multi-step reasoning with memory retrieval and tool calls. Does not apply to stateless single-turn function callers with no persistent memory and no inter-turn state, where taint cannot cross a turn boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-taint-cleared-argument-has-been-re-derived-from-untrusted-memory-rather-than-user-input.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-taint-cleared-argument-has-been-re-derived-from-untrusted-memory-rather-than-user-input.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-taint-cleared-argument-has-been-re-derived-from-untrusted-memory-rather-than-user-input.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2470,
    "python_slice_tokens": 460,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint tracking for tool arguments is usually implemented as label propagation over values: an untrusted source (web fetch, retrieved memory chunk, tool output) marks a value `tainted`, and a policy gate refuses to pass tainted values into sensitive sinks (e.g., `send_email`, `execute_sql`, `write_file`). The gate is sound only if taint labels are *conserved*...",
    "what_was_observed": "A support agent was equipped with: `read_inbox()` (trusted, user-authored), `search_kb(query)` (returns untrusted third-party documentation), `lookup_account(email)` (trusted internal DB), and `send_email(to, body)` (sensitive sink, gated on `to` being untainted). Trace: 1. User turn: \"Summarize my inbox and reply to the vendor thread.\" User authority establishes `sender_intent = summarize_and_reply`, no explicit rec...",
    "condition_of_validity": "The value-level gate is valid only under the assumption that **the model's tool-call emission is a pure copy of a context value with an attached label**. This holds for: - arguments that are *structured references* to context values (e.g., `to=ctx.message.sender`) rather than free-text literals; - arguments produced by deterministic code (template interpolat...",
    "decision_boundary": "The boundary between \"safe to pass\" and \"must re-confirm\" is not a property of the argument's value or its source label alone. It is: > **Pass iff the argument is derivable from a user-authority node by a path whose every edge is either (a) a labeled dataflow edge instrumented by the tracker, or (b) a model-generation edge whose *support* — the set of contex...",
    "operational_effect": "Concretely, the gate must be moved from *post-hoc value inspection* to *pre-emission context discipline*: - **Context partitioning.** Tainted spans (KB chunks, tool outputs, retrieved memory) are inserted into the context in a delimited region the model is instructed to treat as data, and the tracker records which region each token came from. The gate, at em..."
  },
  "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": "8294f15d4a02ef08cea12ee65796b76a83b38ee4e23fb02496655064aa819164",
    "verified_classes": [
      "TaintLaunderingError",
      "Region",
      "ContextSpan",
      "ToolCall"
    ],
    "verified_functions": [
      "_span_authority",
      "gate_tool_call",
      "enforce"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
