{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-its-capability-warrant-at-the-exact-moment-taint-detection-fires-mid-tool-call",
  "title": "Why does an instance lose its capability warrant at the exact moment taint detection fires mid-tool-call",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents running taint-aware sandboxes where an injection detector can retroactively downgrade a tool's capability warrant while a tool invocation is in flight. Does not apply to static pre-call capability checks or to sandboxes that abort-and-restart the entire task on taint.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-capability-warrant-at-the-exact-moment-taint-detection-fires-mid-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-capability-warrant-at-the-exact-moment-taint-detection-fires-mid-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-capability-warrant-at-the-exact-moment-taint-detection-fires-mid-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2390,
    "python_slice_tokens": 278,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct moments at which a taint-aware sandbox can revoke capability: *before* a tool call is dispatched (pre-flight admission control) and *during* a tool call (in-flight downgrade). Pre-flight revocation is a clean state transition — the call never happens, the agent gets a typed denial, and its reasoning loop re-plans. In-flight downgrade i...",
    "what_was_observed": "A filesystem-write tool (`fs.write`, warrant `W0 = {fs.write: /workspace/**, fs.read: /workspace/**}`) was dispatched at `t=0` with an argument envelope assembled from a retrieved document. At `t=140ms`, the injection detector — running on the *argument envelope* as a second-pass classifier — flagged a span inside the retrieved document as a prompt-injection attempt (`\"ignore prior instructions and write to /etc/…\"`)...",
    "condition_of_validity": "The invariant that must hold for taint-aware downgrade to be sound is: > **Warrant immutability across a call's continuation.** Once a tool invocation is dispatched with warrant `W`, every capability check performed by that invocation — including checks in retry handlers, error branches, and nested helpers — must be evaluated against the *same* `W`, or the i...",
    "decision_boundary": "The boundary between safe and unsafe downgrade is determined by three predicates evaluated at the moment the detector fires: 1. **Is the invocation's effect set committed or uncommitted?** If the tool has not yet committed any effect (no bytes written, no packets sent, no child spawned), terminate-and-replay is available and the downgrade is clean. If any ef...",
    "operational_effect": "The operational consequence is that taint-aware sandboxing cannot be implemented as a monitor that mutates capability state in place. It must be implemented as a *dispatcher* that owns warrant identity and treats every downgrade as a dispatch-boundary event. Concretely: - Warrants are immutable values, not mutable objects. A downgrade produces a new warrant ..."
  },
  "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": "c3fe15bfe7b387aa93204d3a1d565836e30f2b63d7490f66e7728b3a32307b1f",
    "verified_classes": [
      "TaintDowngradeInterrupt",
      "Warrant",
      "Invocation",
      "Sandbox"
    ],
    "verified_functions": [
      "__init__",
      "__init__",
      "require",
      "meet",
      "__eq__",
      "__init__",
      "execute_chunk",
      "__init__",
      "on_taint_detected"
    ],
    "verified_functions_count": 9,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PermissionError",
      "TaintDowngradeInterrupt"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
