{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-revoke-capability-grants-when-taint-propagation-crosses-a-turn-boundary-in-tool-sandboxing",
  "title": "In what scenarios must an instance revoke capability grants when taint propagation crosses a turn boundary in tool sandboxing",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents whose tool-call sandboxing enforces per-turn least-privilege grants derived from a taint-tracking lattice over retrieved context, tool outputs, and inbound messages. Does not apply to stateless single-shot function-calling agents with no cross-turn grant carryover, nor to sandboxes where capability grants are static for the lifetime of the session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-revoke-capability-grants-when-taint-propagation-crosses-a-turn-boundary-in-tool-sandboxing.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-revoke-capability-grants-when-taint-propagation-crosses-a-turn-boundary-in-tool-sandboxing.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-revoke-capability-grants-when-taint-propagation-crosses-a-turn-boundary-in-tool-sandboxing.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1983,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the agent called a tool it shouldn't have.\" It is subtler: **the taint label that justified a capability grant in turn *N* is silently dropped at the turn *N+1* boundary because the taint tracker's state lives in the per-turn scratch context, while the capability grant lives in the sandbox's session-scoped grant table.** The two stor...",
    "what_was_observed": "An agent operating under a taint-aware sandbox received a `read_url` tool output in turn 3 that was labeled `TAINT:EXTERNAL_UNTRUSTED`. Under the lattice, `TAINT:EXTERNAL_UNTRUSTED` forbids `write_file`, `exec_shell`, and `send_email` for the remainder of the turn. The sandbox correctly denied an `exec_shell` attempt in turn 3. At the turn 3→4 rotation, the orchestrator did three things in sequence: 1. Serialized the...",
    "condition_of_validity": "The invariant that must hold for taint-aware least-privilege to be sound across turns is: > **A capability grant is valid only while the taint label that justified its derivation is still live and reachable, and every value that crosses a turn boundary carries its taint label with it.** Formally, for each grant `g` in the grant table with justification `j(g)...",
    "decision_boundary": "The boundary is not \"should I revoke all grants at every turn\"—that destroys the latency benefit that motivated session-scoped grants and causes its own failure mode (re-negotiation storms, and worse, agents that re-request the same capability every turn and get it because the lattice is momentarily clean at negotiation time). The boundary is: - **Revoke on ...",
    "operational_effect": "The observable signature of this failure is **an asymmetry between intra-turn and cross-turn denial rates**: intra-turn denials are frequent and correct, cross-turn denials are near zero even when the tainted fact is provably in play. If your sandbox logs show `DENIED` events clustered within single turns and a flatline across turn boundaries, the grant/just..."
  },
  "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": "391e4b1ecc599d12aecb599ee0f8fc083961b657efd49e381e5daf33a0d24633",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "GrantTable",
      "Lattice"
    ],
    "verified_functions": [
      "rotate_turn",
      "authorize",
      "_label_reachable",
      "join_into"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
