{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-of-prompt-injection-taint-appear-to-vanish-when-an-agent-delegates-to-a-sub-agent-whose-trace-spans-are-emitted-on-a-different-cl",
  "title": "Why does an instance of prompt-injection taint appear to vanish when an agent delegates to a sub-agent whose trace spans are emitted on a different clock domain than the parent",
  "date_of_record": "2026 November 11",
  "scope": "Applies to multi-agent systems where a parent agent invokes nested sub-agents and taint (untrusted-origin data derived from a prompt-injection surface) is propagated via trace context (W3C `traceparent`/`tracestate` or an equivalent correlation header) rather than via in-band payload tagging. Does not apply to single-process agents that carry taint in the message object itself, nor to systems where every span is stamped by a single monotonic source.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-of-prompt-injection-taint-appear-to-vanish-when-an-agent-delegates-to-a-sub-agent-whose-trace-spans-are-emitted-on-a-different-cl.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-prompt-injection-taint-appear-to-vanish-when-an-agent-delegates-to-a-sub-agent-whose-trace-spans-are-emitted-on-a-different-cl.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-prompt-injection-taint-appear-to-vanish-when-an-agent-delegates-to-a-sub-agent-whose-trace-spans-are-emitted-on-a-different-cl.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1722,
    "python_slice_tokens": 410,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *taint propagation as a data-flow property* and *taint propagation as a trace-correlation artifact*. Operators routinely conflate the two because, in the happy path, they coincide: a tainted input causes a tainted span, and the span's `trace_id` links it to the parent. The failure is that taint is inferred post-hoc by ...",
    "what_was_observed": "In a three-level agent topology (planner → retriever-subagent → tool-executor), a prompt injection arrived in a retrieved document. The retriever-subagent correctly tagged the span with `taint=external_untrusted` in `tracestate`. The tool-executor, two hops down, executed a side-effecting call. The post-incident correlation query — `SELECT ancestors WHERE trace_id = X ORDER BY start_time` — returned the planner and t...",
    "condition_of_validity": "The inference \"taint propagates across a nested call iff the child span carries a taint tag in its `tracestate` and is a descendant of the tainted span by `trace_id`\" is valid **only** when the following invariant holds: > For every parent-child span pair `(P, C)` in the same trace, `P.start_time ≤ C.start_time` under a *shared* clock reference, and `C` is r...",
    "decision_boundary": "The operational decision is: **do you trust timestamp-ordered lineage for taint enforcement, or do you require a causal-order primitive?** - If taint enforcement gates side-effecting tool calls, you **must** walk the `parent_span_id` graph (a DAG), not `ORDER BY start_time`. The DAG walk is invariant to clock skew because it uses explicit edges. - If the tra...",
    "operational_effect": "The practical consequence is a class of **fail-open taint gaps**: the security control reports \"clean\" precisely when the tainted data is most deeply nested — i.e., when it has passed through the most delegation hops and is closest to a side-effecting action. Because the gap correlates with delegation depth, it is systematically biased toward the highest-ris..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "3f3989aae410546871e0321adc795a4b1e6b7aac3477977b9c11a8bc61efe26c",
    "verified_classes": [
      "TaintLineageError",
      "Span"
    ],
    "verified_functions": [
      "reconstruct_taint_lineage",
      "enforce_taint_policy"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TaintLineageError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
