{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-carries-untrusted-context-taint-across-a-mid-task-checkpoint-and-resumes-inside-a-privileged-tool-scope",
  "title": "What happens when an instance carries untrusted-context taint across a mid-task checkpoint and resumes inside a privileged tool scope",
  "date_of_record": "2026 November 28",
  "scope": "Applies to single-instance agents that persist state to an external checkpoint store and later resume execution, where tool calls are gated by a taint-tracking sandbox that forbids privileged actions when untrusted context is present in the working set. Does not apply to stateless request/response agents with no checkpoint/resume boundary, nor to systems that re-derive taint from scratch on every resume by replaying the full provenance log.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-carries-untrusted-context-taint-across-a-mid-task-checkpoint-and-resumes-inside-a-privileged-tool-scope.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-carries-untrusted-context-taint-across-a-mid-task-checkpoint-and-resumes-inside-a-privileged-tool-scope.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-carries-untrusted-context-taint-across-a-mid-task-checkpoint-and-resumes-inside-a-privileged-tool-scope.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1956,
    "python_slice_tokens": 353,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-aware sandboxing is usually specified as a property of the *current context window*: if any span in the active working set is marked untrusted (fetched web page, tool-returned document, user-supplied file), then privileged sinks (outbound HTTP, credential-bearing API calls, filesystem writes outside the sandbox) are blocked. This invariant holds cleanl...",
    "what_was_observed": "A two-phase task: phase 1 fetches an attacker-controlled support ticket via a `read_ticket` tool, extracts a summary, and writes a checkpoint. Phase 2 resumes, reads a customer record via `crm_lookup`, and calls `send_email` to notify the customer. The sandbox policy is `deny(send_email, crm_write, http_post) if tainted(working_set)`. Trace of the failure: 1. Phase 1, turn 3: `read_ticket` returns a body containing a...",
    "condition_of_validity": "The taint-block invariant `deny(sink) if tainted(working_set)` is valid only under the conjunction: - **(C1) Provenance is co-serialized with content.** Every span in the checkpoint carries its label and source, and the loader reconstructs the provenance map from those fields rather than applying a default. - **(C2) Derived spans inherit and persist taint.**...",
    "decision_boundary": "The boundary is not \"does the sandbox block privileged actions when tainted\" — it does. The boundary is **whether the checkpoint format is a trust-preserving encoding or a lossy one**. Concretely, decide per checkpoint schema: - If the schema has a per-span `provenance` object and the loader fails closed on absence → the seam is safe; resume is equivalent to...",
    "operational_effect": "Downstream consequences when the boundary is crossed: - **Silent privilege escalation across the seam.** The phase-2 instance holds the union of phase-1 privileges and phase-1 content, with none of phase-1's taint. Effective capability is strictly greater than either phase alone. - **Denial-as-plan contamination.** Blocked-action records that survive as plan..."
  },
  "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": "d73a69031ff9b3571b031c552033bdda585665a614135199803d235e7205ff0e",
    "verified_classes": [
      "TaintLaunderingOnResume",
      "Span",
      "Checkpoint"
    ],
    "verified_functions": [
      "serialize",
      "resume",
      "privileged_call",
      "run_resumed_task"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingOnResume"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
