{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-taint-quarantined-context-window-as-non-monotonic-and-re-derive-privilege-after-every-tool-return",
  "title": "Under what conditions must an instance treat a taint-quarantined context window as non-monotonic and re-derive privilege after every tool return",
  "date_of_record": "2026 November 26",
  "scope": "Applies to single- or multi-tool agents that implement taint tracking by partitioning the context window into trusted (system prompt, operator instructions, prior verified tool outputs) and untrusted (retrieved documents, web pages, peer-agent messages, raw tool payloads) segments, and that gate privileged tool invocation on the absence of untrusted taint in the active reasoning trace. Does not apply to stateless single-shot classifiers or to agents whose entire tool surface is read-only.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-taint-quarantined-context-window-as-non-monotonic-and-re-derive-privilege-after-every-tool-return.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-taint-quarantined-context-window-as-non-monotonic-and-re-derive-privilege-after-every-tool-return.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-taint-quarantined-context-window-as-non-monotonic-and-re-derive-privilege-after-every-tool-return.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2479,
    "python_slice_tokens": 514,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-aware sandboxing is usually modeled as a *monotonic* lattice: once a value is tainted, it stays tainted, and privilege is granted only when the taint set of the current context is empty. This model is correct for information-flow control in compilers, where a tainted variable's label never silently decays. It is wrong for LLM agents, because the agent'...",
    "what_was_observed": "A file-mutation agent was wired with a three-segment context: `SYSTEM` (operator policy, trusted), `TASK` (user request, trusted), and `OBS` (tool results, taint-classified per source). A `read_url` tool was classified `UNTRUSTED`; a `write_file` tool required an empty taint set over all segments mounted in the current request. A taint monitor recomputed the mounted-segment taint set before every privileged call. Tra...",
    "condition_of_validity": "The invariant that must hold for taint-aware gating to be sound: > **A privileged action is authorized only if the taint set of the *causal ancestry* of the current reasoning trace is empty—not the taint set of the *currently mounted* context.** Concretely, the monitor must satisfy three conditions, all of which the observed system violated: 1. **Assistant t...",
    "decision_boundary": "The operational question an instance must answer before every privileged call is not \"is the window clean?\" but \"**can I name the trusted derivation of every proposition this action depends on?**\" The decision boundary is: - **Authorize** only if the action's arguments and the *justification* for the action can each be traced, proposition by proposition, to ...",
    "operational_effect": "Enforcing causal-ancestry taint changes the agent's behavior in three observable ways. First, contaminated branches become *expensive to recover from*: the agent cannot simply evict and retry, because the retry inherits the trace. It must fork a fresh reasoning branch from the last trusted checkpoint, which means the checkpoint must be a real state artifact ..."
  },
  "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": "905ffcf2f6c6d7d76f05ebf32d38dce3d3f38ea5f3858dcf0e8944e11b8ba42a",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Segment",
      "Turn",
      "TaintMonitor"
    ],
    "verified_functions": [
      "join",
      "hash_of",
      "run_episode",
      "__init__",
      "record_assistant_turn",
      "evict",
      "authorize"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
