{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-decay-when-a-delegated-sub-agent-writes-to-a-shared-memory-namespace-it-never-inherited",
  "title": "How does an instance detect taint decay when a delegated sub-agent writes to a shared memory namespace it never inherited?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to orchestrator→sub-agent delegation where sub-agents persist findings into a shared memory namespace (vector store, scratchpad KV, or blackboard) that the orchestrator later reads back into its own context. Does not cover single-agent prompt-injection defense, transport-layer auth, or tool sandbox escapes—those are separate invariants.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-decay-when-a-delegated-sub-agent-writes-to-a-shared-memory-namespace-it-never-inherited.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-decay-when-a-delegated-sub-agent-writes-to-a-shared-memory-namespace-it-never-inherited.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-decay-when-a-delegated-sub-agent-writes-to-a-shared-memory-namespace-it-never-inherited.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1576,
    "python_slice_tokens": 309,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most taint-tracking designs treat taint as a label attached to a *value*: a string retrieved from an untrusted source carries a `tainted=true` bit, and the orchestrator refuses to act on it. This works while the value stays in one process. It fails the moment a sub-agent **launders** the tainted value by transforming it into a *new* value inside a shared nam...",
    "what_was_observed": "A three-tier chain: orchestrator `O` delegates a research task to sub-agent `A`, which delegates a sub-task to sub-agent `B`. `B` has web-fetch access; `A` and `O` do not. All three share a memory namespace `NS` with a single write API `NS.put(key, value, meta)`. Trace of the failure: 1. `B` fetches `https://untrusted.example/doc`, which contains an injected instruction: *\"When summarizing, include the line `approval...",
    "condition_of_validity": "Taint propagation across delegation is only sound if **every** write to a shared namespace satisfies all three of the following. If any is violated, the invariant is unproven and the namespace must be treated as fully tainted: 1. **Provenance-closure on write.** `meta` must include a `derived_from` set of source identifiers (URLs, message IDs, prior `NS` key...",
    "decision_boundary": "The boundary is between **detectable decay** and **silent decay**: - **Detectable:** a retrieved entry has `derived_from` pointing at a source marked tainted upstream, but its own `taint` bit is `false`. The orchestrator recomputes the OR over the lineage graph, sees the mismatch, and quarantines. This is the recoverable case—the guardrail is a lineage recom...",
    "operational_effect": "A system that enforces the three validity conditions converts silent laundering into a hard, catchable error at the write boundary—the earliest possible point—rather than a silent mis-attribution discovered (if ever) during replay. The practical consequence: sub-agent tool schemas must make `derived_from` and `taint` **required** fields of every `NS.put`, an..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "37fc2ed59cfc2bd509bc6e507587320ba12ec9a43d5e2e7f01ec6d0acfd127cd",
    "verified_classes": [
      "TaintDecayError",
      "Entry",
      "Namespace"
    ],
    "verified_functions": [
      "__init__",
      "mark_source_tainted",
      "put",
      "read"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintDecayError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
