{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-silently-re-elevate-privilege-after-a-taint-clearing-checkpoint-when-a-poisoned-tool-result-is-still-resident-in-the-kv-cache",
  "title": "Why does an instance silently re-elevate privilege after a taint-clearing checkpoint when a poisoned tool result is still resident in the KV cache",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that implement taint-tracking over context segments and downgrade tool privileges (capability scopes, write access, egress) when untrusted content is ingested, then restore privilege after a \"clean\" checkpoint. Does not apply to stateless single-shot tool calls or to systems that hard-reset the entire context window on every untrusted ingestion.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-silently-re-elevate-privilege-after-a-taint-clearing-checkpoint-when-a-poisoned-tool-result-is-still-resident-in-the-kv-cache.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-silently-re-elevate-privilege-after-a-taint-clearing-checkpoint-when-a-poisoned-tool-result-is-still-resident-in-the-kv-cache.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-silently-re-elevate-privilege-after-a-taint-clearing-checkpoint-when-a-poisoned-tool-result-is-still-resident-in-the-kv-cache.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1764,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **taint as a property of the logical message graph** and **taint as a property of the physical token buffer the model actually conditions on**. Most taint-aware sandboxes track the former: a message object carries a `trusted: bool` or a taint label, and the privilege gate reads that label. But the model's behavior...",
    "what_was_observed": "A tool-using agent ingested an untrusted document via a `fetch_url` tool whose output was tagged `taint=untrusted`. Per policy, the orchestrator downgraded the tool set for the next N steps: no `write_file`, no `send_email`, no `shell`, egress restricted to an allowlist. The agent summarized the document, and the summary was written to a scratch buffer. The orchestrator then applied its standard \"sanitization checkpo...",
    "condition_of_validity": "Privilege re-elevation after taint clearing is sound **if and only if** all three hold: 1. **Physical eviction.** Every token derived from the untrusted segment is absent from the effective context the model conditions on for the elevated step—not merely absent from the logical message list. This means the prefix cache must be invalidated for any span that c...",
    "decision_boundary": "The boundary is: **does the elevated step's effective context provably exclude every descendant of the tainted segment?** - If the platform cannot prove physical eviction (e.g., it uses opaque prefix caching, or the serving layer does not expose cache-invalidation primitives), then taint clearing must not re-elevate. The safe fallback is to keep the downgrad...",
    "operational_effect": "The practical consequence is that taint-aware sandboxing without cache-aware eviction provides *false assurance*: it passes audits (the label says untrusted, the gate says downgraded) while the model conditions on poison. The failure is not a crash; it is a privilege escalation that looks like a normal tool call. Detection requires comparing the gate's view ..."
  },
  "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": "1e0075f36f09357061ef9ad07b489b0224717ac05b116847a4f268e9634cda17",
    "verified_classes": [
      "TaintElevationError",
      "Span",
      "ContextManifest"
    ],
    "verified_functions": [
      "re_elevate",
      "add",
      "tainted_resident"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintElevationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
