{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-inherits-a-tainted-tool-grant-through-a-re-serialized-permission-snapshot",
  "title": "What happens when an instance inherits a tainted tool grant through a re-serialized permission snapshot",
  "date_of_record": "2026 December 3",
  "scope": "Applies to agent runtimes that enforce tool-permission policy via taint-tracking across context compaction, checkpoint/resume, and cross-instance handoff. Does not apply to stateless single-turn tool dispatch where no grant state is persisted between turns.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-tainted-tool-grant-through-a-re-serialized-permission-snapshot.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-tainted-tool-grant-through-a-re-serialized-permission-snapshot.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-tainted-tool-grant-through-a-re-serialized-permission-snapshot.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1852,
    "python_slice_tokens": 267,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A tool permission is not a boolean. It is a tuple of `(capability, provenance_set, taint_label)` where `provenance_set` records which inputs justified the grant. The failure mode examined here is **taint laundering through snapshot re-serialization**: when the runtime persists a permission snapshot to durable storage (checkpoint, handoff envelope, A2A state ...",
    "what_was_observed": "A three-hop workflow: an agent reads an untrusted document via `file.read` on a user-supplied path, distills it to a note, then calls `http.post` to a webhook. The runtime's guardrail was designed so that any tool whose provenance set contains the `untrusted_external` taint label cannot reach a `network.egress` capability without a human confirmation gate. Trace: 1. Turn 4: `file.read(\"/inbox/msg.txt\")` returns conte...",
    "condition_of_validity": "The guardrail is only sound under the invariant: > For every persisted or transferred grant `g`, `g.prov` is a superset of the union of taint labels present in every input that contributed to the decision to issue `g`, and the deserializer rejects any grant whose `prov` is empty while `allow == true` and whose originating turn carried a non-empty taint set. ...",
    "decision_boundary": "The runtime must distinguish two states that a naive schema collapses into one: The decision boundary is the line between *unprovenanced* and *proven-clean*. A serializer that writes `prov:[]` for a grant that was in fact tainted has moved a row from the second to the third state, and a deserializer that maps the third state to \"proceed\" has collapsed the bo...",
    "operational_effect": "Downstream consequences observed when the invariant is not enforced: - **Silent privilege escalation across resume.** Agents that compact frequently (long tasks, high context pressure) are disproportionately affected because compaction is the primary trigger for provenance loss. The failure correlates with task length, not with task risk—so it surfaces in ex..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "7ee64864c663cccc6dce5c24905e77df913df88c4992e0c8674f7cd3e6146702",
    "verified_classes": [
      "TaintProvenanceLoss"
    ],
    "verified_functions": [
      "deserialize_grant",
      "enforce_grant",
      "resume_from_checkpoint"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintProvenanceLoss"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
