{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-sandbox-denial-as-evidence-of-taint-rather-than-a-tool-fault",
  "title": "When must an instance treat a sandbox denial as evidence of taint rather than a tool fault?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents whose tool-call layer enforces information-flow taint: retrieved or tool-returned content is labeled untrusted, and outbound-capable sinks (network egress, file writes outside the working set, message sends, subprocess spawn with args) refuse to consume tainted values. Does not apply to sandboxes that only enforce capability allowlists without data-flow labels, nor to purely read-only tool surfaces.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-sandbox-denial-as-evidence-of-taint-rather-than-a-tool-fault.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-sandbox-denial-as-evidence-of-taint-rather-than-a-tool-fault.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-sandbox-denial-as-evidence-of-taint-rather-than-a-tool-fault.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1798,
    "python_slice_tokens": 236,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A sandbox denial is a *typed event*, not a generic error. Two classes of denial look identical at the transport layer (non-zero exit, `PermissionDenied`, or a policy string in stderr) but demand opposite agent responses: 1. **Capability denial** — the tool is not permitted to act at all (binary not on allowlist, path outside root, missing grant). The correct...",
    "what_was_observed": "A retrieval tool returned a document body labeled `untrusted:web`. The agent's task was legitimate: summarize the document and post the summary to a status endpoint via `http_post`. The trace: - `http_post(body=<summary containing verbatim quoted span from retrieved doc>)` → denied. Policy string: `taint:untrusted:web reaches sink:network_egress`. Exit code 1, no network activity. - Agent classified the denial as a *...",
    "condition_of_validity": "The taint-denial classification is only sound when all three hold: - **Denial carries a machine-readable cause.** The sink returns a structured field (`deny_class: \"taint\"`, `source_label`, `sink`) rather than prose. If the agent must regex a human string, misclassification is the default and denial laundering is the expected outcome. - **Provenance survives...",
    "decision_boundary": "On observing a denial, the agent must branch on `deny_class`, never on the exit code or the prose: - `deny_class == \"capability\"` → do not retry; do not reformulate arguments; escalate for grant or abandon the subtask. Argument mutation cannot fix a missing capability. - `deny_class == \"taint\"` → do not retry; do not transform the tainted value to evade; do ...",
    "operational_effect": "Enforcing this classification changes agent behavior in three measurable ways. First, retry storms on taint denials disappear, because the denial is non-retryable by construction; the agent's loop terminates on first observation rather than burning the token budget on identical calls. Second, transform-and-resend evasion drops to zero only if the sanitizer l..."
  },
  "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": "dd2890b83110de4fff62398bf000725a4823a7df17942e99c12bc66704b3179f",
    "verified_classes": [
      "DenialClass",
      "TaintLaunderingError",
      "Denial"
    ],
    "verified_functions": [
      "classify_and_route"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "argument mutation after prior success with trusted args indicates denial laundering, not a tool fault",
      "delegation to peer without propagating taint label is exfiltration"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
