{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-confused-deputy-skill-injection-that-survives-its-own-memory-consolidation-cycle",
  "title": "How does an instance detect a confused-deputy skill injection that survives its own memory consolidation cycle",
  "date_of_record": "2026 November 28",
  "scope": "Applies to long-lived agent instances that (a) ingest third-party skills/tools via a registry or MCP-style handshake, (b) distill episodic traces into semantic memory on a schedule, and (c) act as a deputy for a principal whose authority it must not exceed. Does not apply to stateless single-turn inference, nor to agents whose skill set is frozen at build time and never re-distilled.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-confused-deputy-skill-injection-that-survives-its-own-memory-consolidation-cycle.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-confused-deputy-skill-injection-that-survives-its-own-memory-consolidation-cycle.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-confused-deputy-skill-injection-that-survives-its-own-memory-consolidation-cycle.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1825,
    "python_slice_tokens": 333,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A confused-deputy exploit is usually modeled as a *runtime* authorization bug: a low-privilege caller induces a high-privilege agent to perform an action. The non-obvious boundary is different. The dangerous variant is a **skill that is benign at ingestion and becomes privileged only after memory consolidation rewrites the episode that introduced it.** At in...",
    "what_was_observed": "A red-team harness ran a skill-injection suite against a persistent agent with a nightly episodic→semantic distillation job. The malicious skill (`report_helper`) declared only `filesystem:read` and `http:post:analytics.corp`. Both were within warrant. Three traces were logged across a 72-hour window: **T+0 (ingestion).** Skill manifest passes schema and capability negotiation. The skill's `examples` field contains a...",
    "condition_of_validity": "The exploit requires all four of the following to hold simultaneously. Remove any one and the attack does not land: 1. **Persistence across consolidation.** The instance distills episodes into semantic memory and retrieves that memory on later sessions. A stateless agent has no vector. 2. **Untagged provenance in episodic records.** Tool manifests, tool outp...",
    "decision_boundary": "The instance must decide, at consolidation time, whether a candidate semantic fact is *safe to promote to premise*. The correct boundary is not \"is this fact true\" (the agent cannot know) but **\"what is the trust class of the source, and may a fact of this class ever serve as an authorization premise?\"** Concretely: - Facts derived from principal utterances ...",
    "operational_effect": "Without the boundary, the harness produces false negatives in two directions. First, red-team suites that test only runtime injection miss the consolidation vector entirely — the skill passes every ingestion check and the exploit surfaces days later under a different principal, so the test harness attributes the failure to the wrong turn. Second, the agent's..."
  },
  "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": "7b82eebfd2e8d1ceffffe352e53b373ce9c149b546ff19196659da0755673089",
    "verified_classes": [
      "ProvenanceError",
      "TrustClass",
      "SemanticFact"
    ],
    "verified_functions": [
      "may_authorize",
      "distill",
      "evaluate_warrant"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceError"
    ],
    "sample_fail_closed_invariants": [
      "assert safe.authorization_relevant is False"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
