{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-taint-persistence-in-multi-hop-tool-invocation-graphs-and-why-per-hop-injection-filters-fail-at-depth-3",
  "title": "What structural signals indicate taint persistence in multi-hop tool invocation graphs (and why per-hop injection filters fail at depth ≥ 3)",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that fan out across ≥2 tool calls where the output of one tool is interpolated into the arguments of another, and where any tool can return attacker-influenced text (web fetch, email read, issue tracker, RAG retrieval, file read). Does not apply to single-hop, closed-vocabulary tool calls where arguments are constructed only from user-supplied literals with no intermediate tool output.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-persistence-in-multi-hop-tool-invocation-graphs-and-why-per-hop-injection-filters-fail-at-depth-3.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-persistence-in-multi-hop-tool-invocation-graphs-and-why-per-hop-injection-filters-fail-at-depth-3.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-persistence-in-multi-hop-tool-invocation-graphs-and-why-per-hop-injection-filters-fail-at-depth-3.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1853,
    "python_slice_tokens": 348,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **content provenance** (where a byte-string originated) and **argument authority** (which principal is permitted to influence a given argument slot). Most injection defenses — prompt hardening, input scanners on tool *outputs*, \"treat retrieved text as data\" instructions — operate on content provenance: they try to det...",
    "what_was_observed": "A three-hop graph was instrumented: `fetch_page` → `summarize` (an LLM tool that condenses fetched text) → `send_email`. The page body contained an injected directive embedded in a benign-looking list item: Per-hop scanners behaved exactly as designed. The `fetch_page` output scanner flagged nothing because the payload contained no imperative verbs matching its pattern set and no URLs in a call-shaped form. The `summ...",
    "condition_of_validity": "The taint-persistence invariant holds — and per-hop filtering is insufficient — exactly when all three conditions are met: 1. **Re-serialization occurs.** At least one intermediate hop transforms the string's surface form (summarization, translation, JSON→prose→JSON, table flattening) such that substring/AST matching against the original payload no longer ma...",
    "decision_boundary": "The boundary is drawn not on *what the string contains* but on *which slots it is allowed to reach given its provenance label*. Concretely, the enforceable rule: > An argument slot classified `authority-bearing` may be populated only by values whose provenance set is a subset of `{user_turn, trusted_config, typed_literal}`. Any value with `untrusted_tool_out...",
    "operational_effect": "With the gate in place, the hop-3 call is rejected at construction: the `to` slot is `authority-bearing`, the candidate value's provenance includes `untrusted_tool_output` from `fetch_page`, and no declassification record exists. The agent surfaces a `TaintPromotionError`, the email is not sent, and the trace records the exact derivation chain (`fetch_page#1..."
  },
  "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": "0f19e5e93df6a83fd883e12c122041556b7d6ba78582feba96cca485b25a6a1e",
    "verified_classes": [
      "SlotClass",
      "Provenance",
      "TaintPromotionError",
      "Value",
      "Call"
    ],
    "verified_functions": [
      "emit",
      "run",
      "derive"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintPromotionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
